2

I've installed the ASP.NET MVC locally, but I want to be able to use the code that is in the SVN repository on CodePlex rather than the released 1.0 version. However if I remove the reference to the GAC assembly in my solution and add the reference to the locally built System.Web.Mvc, it will build fine, but at runtime it says:

Parser Error Message: The type 'System.Web.Mvc.ViewPage' is ambiguous: it could come from assembly 'W:\source\projects\vinemedia\VineMedia.Site\bin\System.Web.Mvc.DLL' or from assembly 'C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mvc\1.0.0.0__31bf3856ad364e35\System.Web.Mvc.dll'. Please specify the assembly explicitly in the type name.

ChrisF
  • 134,786
  • 31
  • 255
  • 325
Glenn Slaven
  • 33,720
  • 26
  • 113
  • 165

2 Answers2

5

There are a lot of modifications in both web.config and ~/Views/web.config configuration files that need to be made for working with ASP.NET MVC source. You should read this - Steve Sanderson’s blog - Using the ASP.NET MVC source code to debug your app

eu-ge-ne
  • 28,023
  • 6
  • 71
  • 62
  • This post helped me getting MVC to run from the source. I also had to remove the System.Web.MVC dll from the GAC. – Kevin Pullin May 25 '09 at 16:01
  • Your app should work on ASP.NET MVC source without removing System.Web.MVC.dll from GAC. I have apps which are using MVC from GAC and MVC from source on the same machine and they works without any conflicts – eu-ge-ne May 25 '09 at 16:42
-1

A <bindingRedirect> in your web.config file will likely solve this. This post may help.

Community
  • 1
  • 1
womp
  • 115,835
  • 26
  • 236
  • 269
  • binding redirect for asp.net mvc needs to be GACed, and cannot use probing paths as explained in this post. Bad post. – vijayst Nov 01 '13 at 05:03