Search code examples
asp.netwcfgac

Ambigous References in a ASP.net web site, c:\windows\Assembly


Well im having a problem with a web site, If i run the site in my IIS it works ok, but if i try to compile i get the follow error.

**Error 1 The type 'System.Web.Compilation.WCFBuildProvider' is ambiguous: it could come from assembly 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Extensions\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.Extensions.dll' or from assembly 'C:\Windows\assembly\GAC_MSIL\System.Web.Extensions\3.5.0.0__31bf3856ad364e35\System.Web.Extensions.dll'. Please specify the assembly explicitly in the type name. App_WebReferences/**

It compile in my other PC where im running windows XP but in windows 7 i get this error, and i cant find a way to solve it.


I reinstalled the .net 4.0, there was a problem with the installation but i was not able to fully understand what was wrong.


Solution

  • To Correct for this error, try the following: Right click on the web application and choose Property Pages. In the Property Pages window select References in the left hand pane. In the right hand pane, there will be two listings for System.Web.Extensions. Remove the one that is causing the problem.