Solved

AJAX Control Toolkit breaks build to Visual Studio Online

Posted on 2014-01-14
4
1,972 Views
Last Modified: 2014-01-20
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
0
Comment
Question by:Paul Kahl
  • 3
4 Comments
 
LVL 16

Expert Comment

by:Kamal Khaleefa
ID: 39781325
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" %>
0
 
LVL 3

Author Comment

by:Paul Kahl
ID: 39782554
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

0
 
LVL 3

Accepted Solution

by:
Paul Kahl earned 0 total points
ID: 39782660
After much searching, and finding nothing, a friend of mine steered me to this.

Exactly the answer I needed. I ran those steps, and voila - build succeeded!
0
 
LVL 3

Author Closing Comment

by:Paul Kahl
ID: 39793746
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.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now