Avatar of Paul Kahl
Paul Kahl
Flag for United States of America asked on

AJAX Control Toolkit breaks build to Visual Studio Online

I have a project that I've spent over a week on so far (so starting fresh won't really work that well), that includes use of the AJAX Control Toolkit for .Net 4.5.

I have Visual Studio 2012, and I've installed AJAXControlToolkit as a reference via Nuget. I then made a build, and drag/dropped the controls into my Toolbox from the bin folder of that build.

My WebConfig has the reference for the toolkit as well:

<?xml version="1.0"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->
<configuration>
    <appSettings/>
    <system.web>
        <compilation debug="true" targetFramework="4.5">
            <assemblies>
                <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
                <add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="AjaxControlToolkit"/>
            </assemblies>
        </compilation>
        <httpRuntime/>
        <pages controlRenderingCompatibilityVersion="4.0">
            <controls>
                <add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit, Version=4.5.7.1213, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e" namespace="AjaxControlToolkit"/>
            </controls>
        </pages>
    </system.web>
    <system.webServer>
        <handlers>
            <remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit"/>
            <remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit"/>
            <remove name="ExtensionlessUrlHandler-Integrated-4.0"/>
            <add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0"/>
            <add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0"/>
            <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0"/>
        </handlers>
    </system.webServer>
    <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
            <dependentAssembly>
                <assemblyIdentity name="Microsoft.WindowsAzure.Storage" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
                <bindingRedirect oldVersion="0.0.0.0-2.1.0.4" newVersion="2.1.0.4"/>
            </dependentAssembly>
        </assemblyBinding>
    </runtime>
</configuration>

Open in new window


I am building via TFS, to an online destination with Visual Studio Online, but every build results in this set of errors:

17 error(s), 4 warning(s)
$/SCEIP/SCEIP.sln - 17 error(s), 4 warning(s),
View log file
Application\step1.aspx.designer.cs (274): The type or namespace name 'AjaxControlToolkit' could not be found in the global namespace (are you missing an assembly reference?)
Application\eligibility.aspx.designer.cs (58): The type or namespace name 'AjaxControlToolkit' could not be found in the global namespace (are you missing an assembly reference?)
Application\eligibility.aspx.designer.cs (148): The type or namespace name 'AjaxControlToolkit' could not be found in the global namespace (are you missing an assembly reference?)
Application\eligibility.aspx.designer.cs (193): The type or namespace name 'AjaxControlToolkit' could not be found in the global namespace (are you missing an assembly reference?)
Application\step1.aspx.designer.cs (112): The type or namespace name 'AjaxControlToolkit' could not be found in the global namespace (are you missing an assembly reference?)
Application\step1.aspx.designer.cs (148): The type or namespace name 'AjaxControlToolkit' could not be found in the global namespace (are you missing an assembly reference?)
Application\step1.aspx.designer.cs (175): The type or namespace name 'AjaxControlToolkit' could not be found in the global namespace (are you missing an assembly reference?)
Application\step1.aspx.designer.cs (247): The type or namespace name 'AjaxControlToolkit' could not be found in the global namespace (are you missing an assembly reference?)
Application\eligibility.aspx.designer.cs (103): The type or namespace name 'AjaxControlToolkit' could not be found in the global namespace (are you missing an assembly reference?)
Application\step1.aspx.designer.cs (328): The type or namespace name 'AjaxControlToolkit' could not be found in the global namespace (are you missing an assembly reference?)
Application\step1.aspx.designer.cs (346): The type or namespace name 'AjaxControlToolkit' could not be found in the global namespace (are you missing an assembly reference?)
Application\step1.aspx.designer.cs (400): The type or namespace name 'AjaxControlToolkit' could not be found in the global namespace (are you missing an assembly reference?)
Application\step1.aspx.designer.cs (418): The type or namespace name 'AjaxControlToolkit' could not be found in the global namespace (are you missing an assembly reference?)
Application\step1.aspx.designer.cs (436): The type or namespace name 'AjaxControlToolkit' could not be found in the global namespace (are you missing an assembly reference?)
Application\step1.aspx.designer.cs (454): The type or namespace name 'AjaxControlToolkit' could not be found in the global namespace (are you missing an assembly reference?)
Application\step1.aspx.designer.cs (472): The type or namespace name 'AjaxControlToolkit' could not be found in the global namespace (are you missing an assembly reference?)
SCEIP.Master.designer.cs (40): The type or namespace name 'AjaxControlToolkit' could not be found in the global namespace (are you missing an assembly reference?)

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (1605): Could not resolve this reference. Could not locate the assembly "AjaxControlToolkit". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (1605): Could not resolve this reference. Could not locate the assembly "AjaxMin". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (1605): Could not resolve this reference. Could not locate the assembly "HtmlAgilityPack". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (1605): Could not resolve this reference. Could not locate the assembly "Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.


My build works locally (of course) just fine, but if I can't publish it, then it's a failure. I've looked all over online, but found nothing that seems to offer any help at all.
toolkitReference-1.png
toolkitUse-1.png
AJAX.NET ProgrammingASP.NET

Avatar of undefined
Last Comment
Paul Kahl

8/22/2022 - Mon
Kamal Khaleefa

this mean ajaxcontroltoolkit is not defined in your project

make sure that in your project you add the ajax dll as a refrence and in each page you are using ajax the control is registered like this at the top of the page

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
Paul Kahl

ASKER
The DLL is, as the screenshots show, part of the app's references. And it's registered in the pages as well.

I've removed it, and replaced it.

I used the DLL from the manual install (get zip, unzip, add reference to object on drive, add tools from object on drive, drag tools into page), and from the NuGet install (install via Studio, reference added automatically, add tools from dll in bin folder of application, drag tools into page).

Issue still exists.

Code Snippet showing assembly reference in page:
<%@ Page Title="" Language="C#" MasterPageFile="~/SCEIP.Master" AutoEventWireup="true" CodeBehind="profile.aspx.cs" Inherits="SCEIP.account.profile" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>

<%@ Register Src="~/userControls/RightNav.ascx" TagPrefix="uc1" TagName="RightNav" %>

<asp:Content ID="Content2" ContentPlaceHolderID="bodyContent" runat="server">
    <div id="twocolumns">
        <uc1:RightNav runat="server" id="RightNav" />

        <div id="content">
            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>
                    <h1>My Profile</h1>
                    <table style="width: 100%; border-collapse: collapse;">
                        <tr>
                            <th style="width: 20%; padding-left: 3px;">Email:</th>
                            <td style="padding-left: 3px;"><asp:Label ID="lblEmail" runat="server" /></td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <asp:ListView ID="ListView1" runat="server" DataKeyNames="uId" DataSourceID="sdsUserDetails">
                                    <EditItemTemplate>
                                        <tr>
                                            <th>First Name:</th>
                                            <td>
                                                <asp:TextBox ID="FirstNameTextBox" runat="server" Text='<%# Bind("FirstName") %>' MaxLength="50" ValidationGroup="Edit" />
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                                    ErrorMessage="You must enter a First Name"
                                                    Text="!!"
                                                    ControlToValidate="FirstNameTextBox"
                                                    Display="Dynamic"
                                                    EnableClientScript="false" 
                                                    ValidationGroup="Edit"
                                                    ForeColor="#FF0000" />
                                                <ajaxToolkit:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server"
                                                    TargetControlID="FirstNameTextBox"
                                                    FilterMode="ValidChars"
                                                    FilterType="LowercaseLetters, UppercaseLetters, Custom"
                                                    ValidChars=",.-'" />
                                            </td>

Open in new window

ASKER CERTIFIED SOLUTION
Paul Kahl

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Paul Kahl

ASKER
The comments left by others weren't the answer to the problem. More research on my, and a friend's, part, led to the actual answer.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck