You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var resolver = new DefaultAssemblyResolver();
var asm = resolver.Resolve(new AssemblyNameReference("netstandard", new Version("2.0")));
var module = asm.MainModule;
This code successfully resolves the assembly when executed from a .NET 6 app, but it fails in a .NET 4.8.1 app:
Failed to resolve assembly: 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'
The text was updated successfully, but these errors were encountered:
DefaultAssemblyResolver is not able to resolve many assemblies if you check its source code (and BaseAssemblyResolver). You need to add search directories to guide it.
This code successfully resolves the assembly when executed from a .NET 6 app, but it fails in a .NET 4.8.1 app:
The text was updated successfully, but these errors were encountered: