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

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

源错误:

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

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

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


当前回答

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

其他回答

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.

我花了整整一天的时间来解决这个问题。

唯一有效的方法是删除.sln文件,创建一个新文件,然后将项目一个一个地添加回去。

¯\_(五)_/¯- Programming -¯\_(五)_/¯

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

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

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

我也得到了同样的错误…检查您的虚拟目录的IIS配置,并确保属性- ASP。Net - asp。NET版本与项目属性-应用程序-目标框架相同。(这为我解决了这个错误。)

我是这样解决问题的: 只需修复Global.asax中的命名空间。