Solved

AJAX Control Toolkit breaks build to Visual Studio Online

Posted on 2014-01-14
4
2,014 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

OverviewThis article demonstrates a simple search form using AJAX. The purpose of the article is to demonstrate how to use the same code to render a page and javascript (JQuery) and AJAX to make subsequent calls to refine the results. The princip…
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…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

896 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

19 Experts available now in Live!

Get 1:1 Help Now