Reputation: 2235
I inspect .NET dlls with the MetaLoadContext, introduced in .NET core 3.0.
Since the MetaLoadContext needs an assembly resolver (e.g. the provided PathAssemblyResolver) , I want to create an own one which has the strategy that it loads the .NET runtime DLL (e.g. netstandard.dll) from the SDK installation path. The issue is how can I get programmatically the SDK installation path with the runtime DLLs ?
Upvotes: 1
Views: 608
Reputation: 2235
To get the path of the runtime .NET core DLLs call
System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory()
Upvotes: 3