开发者

Visual Studio 2010 build with wrong framework

开发者 https://www.devze.com 2023-01-22 05:39 出处:网络
I\'m working on Visual Studio Profesionnal 2010. In my solution I\'ve got 2 projects The first is a web site with targeted .net runtime 2.0

I'm working on Visual Studio Profesionnal 2010.

In my solution I've got 2 projects The first is a web site with targeted .net runtime 2.0 the second is a dll with targeted .net runtime 2.0 I add the output of t开发者_如何学Che second as assembly of the first.

I build and rebuild and clean my solution result : Build succeeded

But when I launch the projet in my web-browser ( in debug or release ). I've got the Server Error :

This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded

Is there someone who had already the problem?

I think it can be a bug from Visual Studio 2010 but the hotline is very expensive 300€ the phone call.

More Information : I opended my dll with reflector and saw that mscorlib is referenced 2 times the first time Version = 2.0 and the second time version = 4.0


Open the .csproj file with text editor (e.g. Notepad) and see the references in there.

If there are references to frameworks higher than 2.0 remove them or change to 2.0 if possible, save and reload the project.


I am pretty sure that this means that you built with asp.net framework 3.5x, but your server only has 3.0x. Update the runtime on the server.


Your server can only support 3.0, Updating the server will resolve the issue..

0

精彩评论

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