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!
There are some workarounds for this issue: The dll file may not be in /bin folder. Just copy the dll file to /bin folder or set this preference Copy Local = True from Visual Studio. If the problem persists, check if the version of the assembly that is referenced is different than the version it is looking for.
In summary if you get the "Could not load file or assembly error", this means that either your projects or their references were built with a reference to a specific version of an assembly which is missing from your bin directory or GAC.
-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.
You have to update your webservice extension to allow framework 4.0 in IIS. To enable the Web service extension for ASP.NET 4.0:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With