views:

370

answers:

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.

A: 

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

womp
+3  A: 

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
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
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