Reputation: 6296
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 the 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
Upvotes: 2
Views: 703
Reputation: 66388
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.
Upvotes: 1
Reputation: 2151
Your server can only support 3.0, Updating the server will resolve the issue..
Upvotes: -1
Reputation: 8700
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.
Upvotes: 1