The type "System.Web.UI.ScriptManager" is ambiguous: it can come from an assembly

When I run my asp.net application I get the error

The type "System.Web.UI.ScriptManager" is ambiguous:

I have the same problem as this person http://forums.asp.net/t/1313257.aspx when I change 1.0.61025.0 to 3.5 and recompile It resets it to 1.0.61025.0

what can i do to solve this problem. I have been trying to run the application for hours.

thank

Edit ~ HELPPpppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp

I see 2 system.web.extensions files in the GAC. I tried to uninstall with gacutil.exe / u system.web.ext, version = 1.0.61025.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35 Microsoft (R) .NET Generic Caching Utility. Version 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved.

Unknown parameter: Version = 1.0.61025.0 which I am doing wrong.

Edit ~ MY SOLUTION

I went to "Add programs to uninstall" and did not install Ajax Web Extensions 2.0 version 1.0.61025.0

0


source to share


4 answers


It looks like you are (possibly indirectly) referencing an old DLL System.Web.Extensions. Check your config file and search the "System.Web.Extensions" application. Also make sure the old version is not in your bin folder (nor copied there).



Make sure you are not using other libraries that use the old System.Web.Extensions DLL, i.e. AJAX Toolit 1.0.x.

+1


source


You need to comment out the old links to System.Web.Extensions and System.Web.Extensions.Design and add 3.5 to your web.config:

    <!-- <add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> -->
    <!-- <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> -->
    <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    <add assembly="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

      

To prevent them from being added, you will need to remove version 1.0 from the GAC using gacutil:

    C:> cd C:\Program Files\Microsoft Visual Studio 8\SDK\bin
    C:\Program Files\Microsoft Visual Studio 8\SDK\bin>gacutil /u "System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"

      

If you need to remove the link, you can try

    gacutil /u /r "System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" FILEPATH C:\WINDOWS\system32\msiexec.exe "Windows Installer"

      



http://msdn.microsoft.com/en-us/library/ex0ss12c(v=VS.71).aspx will be your syntax link. The above was that I was trying to get rid of the DLL reference from the Windows Installer, but it didn't work as it was a registry reference and not a FILEPATH, or one FILEPATH could have removed I guess. Whatever I needed, it was not provided on the site. So, hunting I went into the registry for "System.Web.Extensions". I found entries for him and his "Designs" version in HKEY_CURRENT_USER \ Software \ Microsoft \ Installer \ Assemblies \ Global. After I deleted 2 entries, I was able to delete them using the first gacutil command which I got there just fine (restart it for "Designs"). &% $ # Microsoft !!!

-Tom

PS If you don't have the SDK for VS 2005, you can also go to gacutil at C: \ WINDOWS \ Microsoft.NET \ Framework \ v1.1 *. Or just go to C: \ WINDOWS \ Assembly and find the ones you need (carefully !!) and click "Uninstall".

PPS You can get one of these "ambiguous link" errors if you have the AJAX Control Toolkit and it automatically updates the 1.0 DLL in your recycle bin - it might not know if to use the GAC or your DLL 3.5 bit. In this case, I had to add these entries to the top of my ASPX page:

    <%@ Assembly Name="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" %>
    <%@ Assembly Name="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" %>

      

I could probably just as easily make them version 1.0 and see if that works ...

+1


source


Refresh the project link and clear the bin directory. Asp.net downloads previous version of AJAX from bin

Make sure you remove: - System.Web.Extensions.dll - System.Web.Extensions.Design.dll
- Old versions of AjaxToolkit.dll

0


source


A newer alternative to solve this problem is to add this to the web config

                                                                                                  

0


source







All Articles