我在一个MVC3项目上工作,收到以下错误:

解析器错误信息:无法加载类型“GodsCreationTaxidermy.MvcApplication”。

源错误:

第1行:<%@ Application Codebehind="Global.asax.cs" Inherits="GodsCreationTaxidermy.Core. core . "MvcApplication" Language=" c# " %>

我得到的错误是无法加载GodsCreationTaxidermy.Core.MvcApplication,但在这个屏幕截图中,核心部分没有显示在错误中:

有人对这个错误有什么想法或解决方案吗?


当前回答

对于我来说,web组装是GAC的一部分……因此,在构建后,它需要安装在GAC和它工作。

其他回答

我不得不说,我尝试了这篇文章中的至少4条建议。没有一个成功。然而,我很高兴地告诉大家,我从备份中恢复过来了。只需要更新日志文件中最后的代码更改。花了不到10分钟。花了3倍的时间阅读这篇文章并尝试其他建议。对不起。

这是一个非常奇怪的错误。祝其他遇到这个小妖精的人好运。

您还可以在IIS中检查站点的属性。(在IIS中,右键单击站点,选择“属性”。)确保物理路径设置指向您的应用程序的正确路径,而不是其他应用程序。(这为我解决了这个错误。)

无法加载项目的错误 首先修复你的错误,重建项目后,它的工作

如果你在同一个解决方案中运行Web和WebApi,如果你不小心忘记将VS解决方案设置为“多个启动项目”,也会发生这种情况。

您可以通过右键单击解决方案资源管理器中的解决方案并选择“属性”来检查这一点。然后寻找“创业项目”。

Yes, I read all the answers. However, if you are me and have been pulling out all of what's left of your hair, then try checking the \bin folder. Like most proj files might have several configurations grouped under the XML element PropertyGroup, then I changed the OutputPath value from 'bin\Debug' to remove the '\Debug' part and Rebuild. This placed the files in the \bin folder allowing the Express IIS to find and load the build. I am left wondering what is the correct way to manage these different builds so that a local debug deploy is able to find and load the target environment.