Could not load file or assembly ':This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded

Susan picture Susan · Aug 26, 2012 · Viewed 78.1k times · Source

I Hvea 3 projects in my solution: BL, DL and the UI. All three projectshave a target framework of >NET 4; I have double-checked this by looking at the property page for each project. I am receiving the following error message when I try run the website at the hosting environment but not when I run it locally.

Could not load file or assembly 'BL' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

Thanks in advance!

Answer

user2721039 picture user2721039 · Aug 27, 2013

-Go to IIS. -Default WebSite-> Your application Directory->Advance Settings->Application Pool-> Set your Version (Ex. ASP.NET v4.0) -Refresh your Application Directory and Browse it. It's done.