Could not load file or assembly 'app_code' or one of its dependencies

。_饼干妹妹 提交于 2019-12-05 14:41:25

If you use Visual Studio Performance Tools then it is possible that Visual Studio left a key in your web.config appsettings section. It causes a 32 bit library to load, which won't work if your application is loading in 64 bit mode.

Check for the following and remove it:

<add key="Microsoft.VisualStudio.Enterprise.AspNetHelper.VsInstrLocation" value="C:\Program Files (x86)\Microsoft Visual Studio 11.0\Team Tools\Performance Tools\vsinstr.exe"/>

This is just a stab in the dark, but maybe there's a problem with your ASP.Net installation on your IIS. Try opening a Visual Studio command prompt and running

aspnet_regiis -i

This will reinstall ASP.Net into IIS.

This error was due to web.config was referencing the wrong package for a class. Clearing the mind over the weekend, and problems are solved easily.

This error happened to me when I first tried to deploy a recently upgraded app (vs2008 to vs2010) using the "Publish..." option and didnt asked to delete the original content.

I got this error when I try to make a publish.

Try to disable your antivirus.

This work for me!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!