How .NET resolves assemblies referenced by dynamically compiled assemblies in memory.
I host the Razor viewer and use it to compile views on the fly, but I have problems with its link to the main assembly of the project. In the compilation options, I add a link to the project assembly, something like this:
The code compiles and works fine if I do not refer to any types in the project DLL - in this case I get the following Error:
Failed to load file or assembly "MyProject, Version = 1.0.0.0, Culture = neutral, PublicKeyToken = null" or one of its dependencies. The system cannot find the specified file.
I checked twice, and this assembly is already loaded at the time the exception is thrown. What am I missing?
source share