Reputation:
I'm trying to create a custom AssemblyLoadContext
utilizing an AssemblyDependencyResolver
in C# under Net Core 3.1 (Visual Studio 2019).
But while I can see AssemblyDependencyResolver
as a public sealed class in the Object Browser, neither IntelliSense nor the source code editor will admit it exists (and I have a using System.Runtime.Loader
statement in the file so it should be recognized).
I've never seen something like this. How do I go about creating an instance of AssemblyDependencyResolver
?
Upvotes: 1
Views: 1861
Reputation: 1324
Per the comment in the question:
Targeting netstandard2.1 will not allow you to access the System.Runtime.Loader.AssemblyDependencyResolver
class; only targeting netcoreapp3.0 or netcoreapp3.1 will do that.
Upvotes: 1