.netasp.net.net-4.0clr4.0

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 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.


Solution

  • Restarted the machine and it worked.