加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

asp.net-mvc – 调试ASP.NET MVC源码?

发布时间:2020-12-15 20:56:08 所属栏目:asp.Net 来源:网络整理
导读:尝试调试ASP.NET MVC 1.0源代码,我按照 these这样的指令,基本上从我的web项目中删除对system.web.mvc的引用,并添加我下载的源项目. 现在,我有这个问题, The type ‘System.Web.Mvc.FormMethod’ exists in both ‘c:WindowsassemblyGAC_MSILSystem.Web.M
尝试调试ASP.NET MVC 1.0源代码,我按照 these这样的指令,基本上从我的web项目中删除对system.web.mvc的引用,并添加我下载的源项目.

现在,我有这个问题,

The type ‘System.Web.Mvc.FormMethod’
exists in both
‘c:WindowsassemblyGAC_MSILSystem.Web.Mvc1.0.0.0__31bf3856ad364e35System.Web.Mvc.dll’ and in my AppDataLocalTempTemporary
ASP.NET
Filesrootdbcbb149897fc019assemblydl3796c00fbf345f2d6_abe3c901System.Web.Mvc.DLL’

我尝试从web.config中注释掉以下内容

<add assembly="System.Web.Mvc,Version=1.0.0.0,Culture=neutral,PublicKeyToken=31BF3856AD364E35" />

但它会产生差异

The type ‘System.Web.Mvc.Controller’
is defined in an assembly that is not
referenced. You must add a reference
to assembly ‘System.Web.Mvc,
Version=1.0.0.0,
PublicKeyToken=31bf3856ad364e35’.

有人可以帮助解决出错的问题以及如何解决问题.非常感谢你!

射线.

解决方法

无需从GAC卸载ASP.NET MVC! (或任何任何< assemblyBinding> s)一步一步地遵循“ Using the ASP.NET MVC source code to debug your app”文章.

有几个类似于你的问题:

> How can you use ASP.NET MVC build from source rather than the GAC?
> MVC. Strongly-typed view difference (MVC sources vs. assembly)

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读