Two projects provided, both targeting just netcoreapp2.0
.
- AppWithReferenceToPackageWithNoAssembly is a simple application with a reference to
Microsoft.CodeAnalysis
package. This package contain no assembly (i.e. a "meta-package"). - Loader is an application using a custom
AssemblyLoadContext
to loadAppWithReferenceToPackageWithNoAssembly
. Loading works fine, but executing code in the loaded assembly will cause reference resolving to happen, and custom context get a chance to resolve a reference toMicrosoft.CodeAnalysis
via itsLoad
override. But how can it, when there is no such assembly?
- CD src\AppWithReferenceToPackageWithNoAssembly
dotnet build
- CD ..\src\Loader
dotnet run