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

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

源错误:

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

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

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


当前回答

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.

其他回答

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

这个问题,我解决了给文件夹的正确权限,以及从IIS检查。

当我在本地环境中测试时,我得到了每个人的许可。但是在发布模式下,我认为我们只允许ASP。网用户。

重新创建虚拟目录为我解决了这个问题。

(在此之前,我尝试了这里列出的其他建议,如清理解决方案,删除bin文件夹,重建解决方案等。没有一个工作,直到我重新创建虚拟目录)

Debug ->调试属性-> Web ->创建虚拟目录

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

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

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