Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting 'System.Web.Mvc.ViewMasterPage' is ambiguous error message

Iam working in an mvc 2 Rc project.It was working fine until today morning.In the morning i got an error message.

Parser Error Message: The type 'System.Web.Mvc.ViewMasterPage' is ambiguous: it could come from assembly 'C:\Intersight\IntersightWeb\bin\IntersightWeb.DLL' or from assembly 'C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mvc\2.0.0.0__31bf3856ad364e35\System.Web.Mvc.dll'. Please specify the assembly explicitly in the type name.

enter image description here

But in the previous execution it was ok.I tried to fix the above issues in many ways.Please help me to proceed.

like image 969
Jayaraj Avatar asked Jun 14 '11 14:06

Jayaraj


1 Answers

There are lots of reasons for that error.

My typical solution for this is : Open your references, go to the properties of System.Web.Mvc and check whether Copy Local is True. If so, try setting it to False and delete the DLL from the bin folder, then Ctrl-F5 again.

Other Fixes:

  1. You can set referenced assemblies to not be copied to the bin folder (right click on the reference and select properties)
  2. Maybe your references points to old dll. You can fix this with open the project using Visual Studio, and in Solution Explorer, expand the References node. Delete the reference to System.Web.Mvc (which points to the version 1.0 assembly). Add a reference to System.Web.Mvc (v2.0.0.0).
  3. Uninstall mvc and reinstall it. Download MVC2 RC
like image 138
gandil Avatar answered Jan 02 '23 10:01

gandil