开发者

Cannot load assembly problem

I receive the following error:

Cannot load assembly. Error details: System.BadImageFormatException: Could not load file or assembly 'file:...' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

This assembly is built with .Net Framework 4.0 and i made sure that a开发者_如何学Cll projects in my solution are also built with .Net Framework 4.0.

Any idea why i am getting the error? How can i check which frameworks are loaded with my application?


What is the main executable, i.e. the assembly responsible for deciding which version of the CLR is loaded? Note that it's not just a case of being built by .NET 4 - if your executable targets .NET 3.5 or lower, it will load in the .NET 2.0 CLR, and your .NET 4 assemblies won't load.


Hello I Had the same problem until i follow these hints: BadImageFormatException Class (section "Remarks")

In my case I was trying to load assemblies with call to umnaged code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜