title: Ajax control toolkit asssembly reference error
body: <p>Hi I am trying to install the ajax controll toolkit in an asp.net project.I have used Nugget to download the library into the project and loaded each control into the toolbox but when I try to use any of the controls I get this error:</p>
  
  <pre><code>Error   3   The type 'System.Web.UI.Design.ExtenderControlDesigner' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.   D:\Projects IDE\Visual Studio\C# Book\ASP.NET\WebSite12\Default.aspx    14  
  </code></pre>
  
  <p>After reading this error I added this in the configuration file:</p>
  
  <pre><code>&lt;assemblies&gt;
        &lt;add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/&gt;
  &lt;/assemblies&gt;
  </code></pre>
  
  <p>I understand that this should point to the assembly I need but it does not work and also maybe someone can tell me from where should I have goten this string in the first place I have seen similar strings used for providersi in asp.net at the type property and I cant understand from where should I get them especialy the PublicKeyToken.</p>
  
  <p>This is my entire code:</p>
  
  <pre><code>    &lt;%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %&gt;
  &lt;%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %&gt;
  
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head runat="server"&gt;
      &lt;title&gt;&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;form id="form1" runat="server"&gt;
          &lt;asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"&gt;
          &lt;/asp:ToolkitScriptManager&gt;
          &lt;asp:AlwaysVisibleControlDesigner ID="AlwaysVisible" runat="server"&gt;
  
          &lt;/asp:AlwaysVisibleControlDesigner&gt;
      &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>And this is the contents of the web.config file:</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;!--
    For more information on how to configure your ASP.NET application, please visit
    http://go.microsoft.com/fwlink/?LinkId=169433
    --&gt;
  &lt;configuration&gt;
    &lt;system.web&gt;
        &lt;compilation debug="false" targetFramework="4.0" &gt;
            &lt;assemblies&gt;
                &lt;add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/&gt;
            &lt;/assemblies&gt;
        &lt;/compilation&gt;
      &lt;pages&gt;
        &lt;controls&gt;
          &lt;add tagPrefix="asp" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" /&gt;
        &lt;/controls&gt;
      &lt;/pages&gt;
    &lt;/system.web&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>Also a second configuration file has been added after installing the ajax control toolkit via nugget called packages.config:</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;packages&gt;
    &lt;package id="AjaxControlToolkit" version="4.1.60919" targetFramework="net40" /&gt;
  &lt;/packages&gt;
  </code></pre>
  
  <p>What am I doing wrong here?Why am I getting that error?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>It turns out I had to add an aditional assembly for this to work:</p>
  
  <pre><code> &lt;assemblies&gt;
            &lt;add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/&gt;
            &lt;add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/&gt;
   &lt;/assemblies&gt;
  </code></pre>
  
  <p>Now I am getting an error that says:</p>
  
  <pre><code>**Error 2   Type 'AjaxControlToolkit.AlwaysVisibleControlDesigner' does not have a public property named 'TargetControlID'. D:\Projects IDE\Visual Studio\C# Book\ASP.NET\WebSite12\Default.aspx    14  
  </code></pre>
  
  <p>**</p>
  
  <p>This is the code:</p>
  
  <pre><code>&lt;asp:AlwaysVisibleControlDesigner ID="AlwaysVisible"  runat="server" TargetControlID="Panel1" HorizontalOffset="10" HorizontalSide="Right" VerticalOffset="10" &gt;
   &lt;/asp:AlwaysVisibleControlDesigner&gt;
  </code></pre>
  
  <p>I am prety sure that this should be corect I got this example from the book Proffesional asp.net in C# and VB</p>
  
  <p>Somehow my code is not getting the ajaxcontrol toolkit properties.How can I corect this?</p>