-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assembly.LoadFrom overload unconditionally throws NotSupportedException #96410
Comments
Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov Issue DetailsDescriptionThe following API: Reproduction Steps
Expected behaviorThe call should either be functional or the API should be marked obsolete. Actual behaviorCode compiles with no warnings only to unconditionally throw an exception at runtime. Regression?Not tested but this API presumably worked on .NET Framework. Known WorkaroundsDon't use this API. Configuration
Other informationNo response
|
Description
The following API:
public static Assembly LoadFrom(string assemblyFile, byte[]? hashValue, AssemblyHashAlgorithm hashAlgorithm)
Unconditionally throws
NotSupportedException
.This is a bad development experience. It looks like a valid API until it is used and it throws at runtime. Marking it as obsolete (or implementing it) would give the necessary development time signal to not use it rather than waste a developer's time.
Reproduction Steps
System.Reflection.Assembly.LoadFrom("", null, System.Configuration.Assemblies.AssemblyHashAlgorithm.None);
Expected behavior
The call should either be functional or the API should be marked obsolete.
Actual behavior
Code compiles with no warnings only to unconditionally throw an exception at runtime.
Regression?
Not tested but this API presumably worked on .NET Framework.
Known Workarounds
Don't use this API.
Configuration
Other information
No response
The text was updated successfully, but these errors were encountered: