开发者

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

here's what i have got two box one win 2003 server IIS6 another开发者_JS百科 one win2008 server IIS 7.0 I have a standalone app named Util (win app) built in .net 2.0 (VS2005) trying to load .net 4.0 dll/assembly (VS2010). this needed a simple setting in the app which was to create a "Util.exe.config" and add following setting

<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup> 

This will basically make sure .net 2.0 uses the CLR 4.0

works like a charm with in winserver2008 box but shouts with above message within win2003 server???

Any ideas??

@update: Both machines have .net 4.0 framework installed.


look at the bottom of the yellow screen of death. it'll tell you which runtime version created the error .

Are we talking about a web app? if we are, you need to change the app pool. The above setting will have no affect on what version of the framework a web app uses.

Simon


Restarted the machine and it worked.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜