ASP.NET MVC source debugging?

Trying to debug the source code of ASP.NET MVC 1.0, I followed these instructions: these basically removed the link to system.web.mvc from my web project and add the source project that I downloaded instead.

Now I have this problem,

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 \ build \ DL3 \ 796c00fb \ f345f2d6_abe3c901 \ System.Web.Mvc.DLL '

I tried to comment from web.config

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

but it will give a difference error

The type "System.Web.Mvc.Controller" is defined in an assembly that is not a reference. You must add a link to the assembly 'System.Web.Mvc, Version = 1.0.0.0, Culture = Neutral, PublicKeyToken = 31bf3856ad364e35'.

Can someone help in what goes wrong and how to fix it. Thank you very much!

Ray

+6
debugging asp.net-mvc
source share
7 answers

No need to remove ASP.NET MVC from the GAC! (or any any <assemblyBinding> s) Just follow " Using ASP.NET MVC source code to debug your application ." step by step.

There are a few questions similar to yours:

  • How can you use the ASP.NET MVC assembly from the source and not from the GAC?
  • MVC Highly distinctive difference of views (MVC sources or assembly)
+7
source share

Are system.web.mvc assemblies in the GAC? you may need to remove them ... this, of course, can ruin future projects, since project templates most likely assume they are in gac.

You can also try using the <assemblyBinding> function as described here to point the mvc material to the version you are working on.

+1
source share

Assuming that the full assembly name for the one you are communicating with is different from the one in the GAC, use the <QualifyAssembly> element and indicate which assembly you are actually referencing. If not, change your local source to change the MVC assembly you create to 1.0.0.1 to make it different.

Change Double check how you got in touch. It worked for me.

  • deleted the system.web.mvc link in my project.
  • Added the System.Web.Mvc project from the source.
  • Comment out the System.Web.Mvc link in my web.config project.
  • modified System.we.b.mvc / Views / Web.Config as indicated in the manual.
  • Ran flawlessly.
+1
source share

for the qualified build section, you want something like this (we do this for SQLite assembly):

  <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <qualifyAssembly partialName="System.Data.SQLite" fullName="System.Data.SQLite, Version=1.0.60.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139" /> </assemblyBinding> </runtime> 
0
source share

Take a look at this article for a complete guide to setting up an MVC source .

There are two web.config files that need to be updated. One is in the MVC project folder, and one is in the Views folder. You probably forgot to update the latter. Otherwise, following the above article, you should do this.

0
source share

A slightly more complete version of Steve Sanderson's instructions can be found here .

It explains how you can also include MVC Futures in your debugging.

0
source share

I posted a better post than recommended in the answer. Please check this to configure asp.net mvc on your system: http://vijayt.com/Post/Setting-up-aspnet-mvc-for-debugging-in-your-system

0
source share

All Articles