Freigeben über


Ambiguous reference to System.UI.Web.Extensions.dll

If you install Visual studio 2008 while the 2005 version exists, and you have a website project that uses ajax, you're bound to run into the following issue:

You'll see an error saying: "Ambiguous reference of System.UI.Web.Extensions.dll found" . And you probably have a reference on your aspx page that says:
<%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TagPrefix="asp" %>

There are a couple of things that you need to do to fix this:
1. Remove the above mentioned line from your aspx page.
2. Go to the property pages of your website project and remove the 3.5 references to System.UI.Web.Extensions and Design.
3. Rebuild your website and solution.

If removing the line gives you an error say <asp:ScriptManager> tag is not defined, then you'll need to add the following line back in:
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TagPrefix="asp" %>

Hope that helps.

Ads-by-Microsoft

Comments

  • Anonymous
    April 05, 2008
    PingBack from http://web-design.crazyblogz.info/?p=2398

  • Anonymous
    May 21, 2008
    I decided to move forward to 3.5 (Why use an old version?) I also found that I had to remove the old 1.0 assemblies from the GAC.  HTH anyone that comes across this blog post.