How to debug asp.net mvc 4 source code?如何调试asp.net mvc4 源代码?
来源:互联网 发布:matlab2017 mac破解版 编辑:程序博客网 时间:2024/06/05 18:05
0down votefavorite
I download the latest source code from here:http://aspnetwebstack.codeplex.com/SourceControl/list/changesets
1) add the system.web.mvc project to my Solution including other projects that system.web.mvc project depends on.
2) change the reference of system.web.mvc assembly in the "CollaborativeDesign.WebUI","CollaborativeDesign.Domain","CollaborativeDesign.UnitTest" project from the GAC one to the system.web.mvc project.
3) change the root Web.config file as following show:
4) change the Web.config file in the "View" directory as following show:
<!--<pages validateRequest="false" pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> <controls> <add assembly="System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" tagPrefix="mvc" /> </controls></pages>--><pages validateRequest="false" pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null" pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null" userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null"> <controls> <add assembly="System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null" namespace="System.Web.Mvc" tagPrefix="mvc" /> </controls></pages>
5) when I run the project, it looks like still using the GAC system.web.mvc.dll, because when I set the breakpoint in the "Controller.cs" file which is in the "system.web.mvc" project, it shows that it doesn't load any symbol for the document, and I also can't step into the method of mvc source code.
How can I debug the source code ? How can I know that the loaded system.web.mvc.dll is the GAC one or my local one ?
Accroding to the @Rick.Anderson-at-Microsoft.com's comment, I have been resolve this problem by doing the following additional steps:
1> Run "sn.exe -Vr *,31BF3856AD364E35" in the Visual Command line
2> Change the "AssemblyVersion" and "AssemblyFileVersion" in the CommonAssemblyInfo.cs which is in the System.Web.Mvc project from "4.0.0.0" to "4.0.0.1". Rebuild the project.
3> Change the Web.config file in the root directory
4> Change the Web.config file in the View directory
5> Restart the Asp.net Development Server. Ok, enjoy the source code! Thank @Rick.Anderson-at-Microsoft.com for the comment.
- How to debug asp.net mvc 4 source code?如何调试asp.net mvc4 源代码?
- How to debug ASP.NET MVC using source code
- ASP.NET MVC Source Code Now Available
- ASP.NET-MVC4-07-Models-in-mvc
- How To Debug an ASP.NET Web Application
- How ASP.NET MVC 4Works?
- How ASP.NET MVC Works
- How ASP.NET MVC Works?
- [MVC4]初识ASP.NET MVC4
- ASP.NET MVC源代码下载。
- ASP.NET MVC Linq to SQL 实现数据库增删改(源代码) ASP.NET MVC 分页控件
- 利用ASP.NET MVC源代码调试你的应用程序
- How to achive the CRUD in ASP.NET MVC(VS2010)
- ASP.NET MVC - how to make users confirm the delete
- asp.net mvc4+easyui
- asp.net mvc4
- ASP.NET MVC4
- ASP.NET MVC4 RemoteAttribute
- Robotium_CalculatorTest
- asp.net 句柄 是什么
- 对SD读写的接口以及实现
- ARM异常返回地址分析
- IT高薪者所具备的人格魅力【转】
- How to debug asp.net mvc 4 source code?如何调试asp.net mvc4 源代码?
- UNICODE下宽字符的CString转换为const char *和char到WCHAR的相互转换
- oracle数据库的搭建初步
- C# 创建windows服务
- VS2010 UML类图生成代码
- C#大批量数据插入MySQL数据库的性能问题
- 获得Unix/Linux系统中的IP、MAC地址等信息[zhuan]
- android property
- struts2验证框架