Trying to debug into ASP.NET MVC 1.0 source, I followed instructions like these, basically remove reference to system.web.mvc from my web project and add the source project 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\assembly\dl3\796c00fb\f345f2d6_abe3c901\System.Web.Mvc.DLL'
I tried commenting out the following from web.config
<add assembly="System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
but it'll give a difference error
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, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Could someone help on what's going wrong and how to fix it. Thank you very much!
Ray.
There is no need to uninstall ASP.NET MVC from GAC! (or any any <assemblyBinding>
s) Just follow "Using the ASP.NET MVC source code to debug your app" article step by step.
There are a couple of questions similar to yours:
Are the system.web.mvc assemblies in the GAC? you might need to remove them ... this of course could mess up future projects as the project templates will likely assume that they are in the gac.
You could also try using the <assemblyBinding>
feature as described here to point the mvc stuff to the version that you are running.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With