Skip to content

Unwarranted FileLoadException #11738

@TiltonJH

Description

@TiltonJH

Type of issue

Outdated article

Description

The documentation of System.Reflection.AssemblyName.ctor(System.String) states that a FileLoadException could be thrown if The referenced assembly could not be found, or could not be loaded..

However, locking at the code here: dotnet/runtime/src/libraries/System.Private.CoreLib/src/System/Reflection/AssemblyName.cs, I fail to find the cause of that exception.

All I can see and tested is the parsing of the specified name.

Could it be that this simply has been copied over from the .NET Framework (net4x) which might very well throw such an exception?
(I am not able to tell. I get lost once it calls some external function.)

Page URL

https://learn.microsoft.com/en-us/dotnet/api/system.reflection.assemblyname.-ctor?view=net-8.0#system-reflection-assemblyname-ctor(system-string)

Content source URL

https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.Reflection/AssemblyName.xml

Document Version Independent Id

e5c6ee0a-69f8-f65c-7cdc-bd1f2233d5ab

Platform Id

3f3da468-904e-8c63-3359-9c6be03eb2b1

Article author

@dotnet-bot

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions