尝试调试ASP.NET MVC 1.0源代码,我按照
these这样的指令,基本上从我的web项目中删除对system.web.mvc的引用,并添加我下载的源项目.
现在,我有这个问题,
The type ‘System.Web.Mvc.FormMethod’
exists in both
‘c:\Windows\assembly\GAC_MSIL\System.Web.Mvc\1.0.0.0__31bf3856ad364e35\System.Web.Mvc.dll’ and in my AppData\Local\Temp\Temporary
ASP.NET
Files\root\dbcbb149\897fc019\assembly\dl3\796c00fb\f345f2d6_abe3c901\System.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)