The type 'System.Web.UI.ScriptManager' is ambiguous

Given the error above and more information below:

The type 'System.Web.UI.ScriptManager' is ambiguous: it could come from assembly 'C:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions\1.0.61025.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.

I have to deal with this issue a couple of times and each time, I have to make a mental note. I figured I'd rather make a post so it can help others and myself in the future to solve the issue when upgrading to 3.5

Steps:
1. Make a backup of your /bin directory and delete all files in it.
2. Re-build the project or website.
3. Add all the DLL's associated with the project.
4. The 4th step is odd but I have to go to Property pages>References and remove both the System.Web.Extensions (3.5) and the System.Web.Extensions.Design (3.5) to make it work. I hope this helps.

- Dennis
menacestudio.com

4 Comments

  • Could this be because you are using the Ajax Control toolkit 1.0 in a .net 3.5 project instead of 3.0.*?

    "Toolkit version 3.0.11119.0 is only for users who are building on top of .NET Framework 3.5 using Visual Studio 2008. If you are using .NET Framework 2.0 and Visual Studio 2005 then you should use Toolkit version 1.0.11119.0."


    http://www.asp.net/ajax/ajaxcontroltoolkit/samples/

    Raj

  • The problem that I was having is towards Ajax specifically and not the toolkit. On the page that I received that error, I'm only using a simple Update panel.


  • See the comments on this page:

    http://weblogs.asp.net/javiervillarreal/archive/2008/01/30/the-type-system-web-ui-scriptmanager-is-ambiguous-it-could-come-from-assembly.aspx

    Raj

  • This worked for me. Thank you!

Comments have been disabled for this content.