I came across a strange error when using NGen from .NET Framework 4 to compile a bunch of DLL assemblies. The install worked for some of the DLLs, but for some others it produced the following error message:
Failed to load the runtime. (Exception from HRESULT: 0x80131700). Assembly AseemblyFileLocation requires version v4.0.30319 of the runtime to run. Assembly will be compiled once the correct runtime is installed.
I am certain that I have the correct runtime version. I found that no one had come across this when I tried a search on web for answers, which is even stranger.
Any leads on this? Thanks.
I ran into this issue as well and it turned out the culprit was the following entry in the assembly .config file:
<startup>
<supportedRuntime version="v3.5"/>
</startup>
Once I removed it, Ngen ran fine.
User contributions licensed under CC BY-SA 3.0