Visual-studio – Error: This assembly is built by a runtime newer than the currently loaded runtime

asp.netvisual studio

I have downloaded published (code behind files are no there, combined with dll in bin folder) web application from Window Server 2008 where it is hosted, and open it with Visual Studio when I debug that application it shows following error:

"Could not load assembly because this assembly is built by a runtime newer than the currently loaded runtime"

I don't know how can I solve this problem and test application locally.
Please help me.

Best Answer

This errors happens when the DotNet framework you are using is of older version than the one used to build the assembly. You need to check which version of framework is used to build those assemblies and then use the same or higher to debug too.