I am seeing this strange issue. I would like to inform that there are many posts on this error but none of them solved the issue that I am facing. Below is my setup.
This means that the exe even though built using v3.5, it should support loading dlls with v4.5 right ? However as soon as I try to load the dll (with v4.5), I get above error. I tried enabling assembly logging - but all I see is
//Config file entry start
<startup>
<supportedRuntime version="v2.0.50727"/>
<supportedRuntime version="v4.0"/>
<supportedRuntime version="v4.5"/>
</startup>
//Config file entry end
//Error start
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
Running under executable d:\My.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: User =
LOG: Where-ref bind. Location = d:\MyCustom.dll
LOG: Appbase = file:///D:/
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
===
LOG: This bind starts in LoadFrom load context.
WRN: Native image will not be probed in LoadFrom context. Native image will only be probed in default load context, like with Assembly.Load().
LOG: Using application configuration file: d:\My.exe.Config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config.
LOG: Attempting download of new URL file:///D:/MyCustom.dll.
ERR: Failed to complete setup of assembly (hr = 0x8013101b). Probing terminated.
My control panel says, I have .NET framework 4.5 but I do not see 'Full' entry, I see only 'client' How to: Determine Which .NET Framework Versions Are Installed
I also tried installing .NET 4.5, but all it does is - it tries to repair. My OS version is Windows 7 professional SP1.
Any clues. Please help. Thanks.
Check out the documentation of the supportedRuntime element, the order matters.
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
This tells you that you're running on the .NET 2.0 runtime. You're never going to be able to load a 4.5 dll while running on the 2.0 runtime.
User contributions licensed under CC BY-SA 3.0