Questions tagged [metadataloadcontext]

2 questions
5
votes
0 answers

Migrating from Assembly.ReflectionOnlyLoad to MetadataLoadContext

I have the below code working for .NET 4.8 class library which uses Assembly.ReflectionOnlyLoad Code: // Retrieve the doman assembly used by the compilation Assembly baseAssembly = typeof(MyType).Assembly; // Retrieve the location of the assembly…
tRuEsAtM
  • 3,517
  • 6
  • 43
  • 83
1
vote
0 answers

How to return the location of the referenced assemblies in a referenced class library from ASP.NET Core Web API?

I have a class library in which I load dynamic assemblies. How can I load these assemblies using the new MetaDataLoadContext and MetaDataAssemblyResolver? Code: // Retrieve the domain assembly used by the compilation Assembly baseAssembly =…
tRuEsAtM
  • 3,517
  • 6
  • 43
  • 83