-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Description
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
- .NET 8
- Windows 10
- x64
- Not specific to this configuration
- Not using Blazor
Other information
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status