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

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

源错误:

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

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

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


当前回答

我有同样的问题,当我有2个实例的Visual Studio运行相同的项目。所以我关闭了两个Visual Studio,只打开了一个实例,它现在工作得很好!

其他回答

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.

I faced the problem in VS 2017 out of no where, took my whole day going through 100 of solutions any of these didnt work. I then took my whole solution and started it on different machine having VS 2017 installation.. IT FINALLY WORKED. Than reinstalled VS 2017 on the original one and it started running on that too. I strongly recommend you try your solution on a different machine before wasting much time to debug it, bcz it is a BUG in VS 2017 as it seemed for me, have reported same to VS TEAM. Hope this helps any one in grief. Cheers.

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

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

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

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

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