Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not load file or assembly 'AjaxMin, Version=4.97.4951.28478, Culture=neutral, PublicKeyToken=21ef50ce11b5d80f' or one of its dependencies

Get this error when I try to view my project in browser on localhost.

Verified that AjaxControlToolkit is setup in references in my project.

AjaxControlToolkit.dll is in the directory listed in the reference.

I re-installed AjaxControlToolkit to make sure that was not the issue.

The project I am working on is a project emailed to me by a colleague and is not something I created from the ground up. Not sure if that is the problem and the project is looking at an old reference?

On a related note, I have another test project in a separate solution and I added an AjaxControlToolkit control to test that (CalendarExtender) and it worked just fine.

Posting my code:

web config:

 <?xml version="1.0"?>
    <configuration>
      <connectionStrings>
        <add name="TESTConnectionString" connectionString="Data Source=(localdb)\v11.0;Initial Catalog=TEST;Integrated Security=True" providerName="System.Data.SqlClient"/>
        <add name="TESTConnectionString2" connectionString="Data Source=(localdb)\v11.0;Initial Catalog=TEST;Integrated Security=True" providerName="System.Data.SqlClient"/>
      </connectionStrings>
      <system.web>
        <httpRuntime targetFramework="4.5" />
        <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"/>



          </assemblies>



       </compilation>

        <!--<pages>-->
          <!--<controls>

            <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=4.97.4951.28478, Culture=neutral, PublicKeyToken=21ef50ce11b5d80f" />
            <add namespace="AjaxControlToolkit" assembly="AjaxControlToolkit" tagPrefix="asp" />

            --><!--<add namespace="AjaxControlToolkit, Version=4.97.4951.28478, Culture=neutral, PublicKeyToken=21ef50ce11b5d80f"/>
            <add tagPrefix="asp" namespace="AjaxControlToolkit" assembly="AjaxControlToolkit, Version=4.97.4951.28478, Culture=neutral, PublicKeyToken=21ef50ce11b5d80f"/>--><!--
          </controls>
        </pages>-->

      </system.web>
    </configuration>

master page:

 <%@ Master Language="C#" %>



    <!DOCTYPE html>
    <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
    <meta charset="utf-8" />    
        <title></title>
        <asp:ContentPlaceHolder id="head" runat="server" />

    </head>
    <body>
        <form id="form1" runat="server">
        <div>
            <%--<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</asp:ToolkitScriptManager>--%>

            <%--<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>--%>
            <asp:ContentPlaceHolder id="Content2" runat="server" />
            <asp:UpdatePanel ID="UpdatePanel1" runat="server" />

        </div>
        </form>
    </body>
    </html>

top of the main .aspx page through the toolkitscriptmanager tag:

  <%@ Page Title="" Language="C#" MasterPageFile="MasterPage.master" AutoEventWireup="true" CodeFile="MAIN.aspx.cs" Inherits="admin_Payments" %>


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


    <asp:Content  ContentPlaceHolderID="head" runat="Server">




        <style type="text/css">
            .auto-style1 {
                text-align: left;
                font-size: medium;
            }

            .auto-style2 {
                font-size: medium;
            }

            .auto-style3 {
                height: 577px;
            }
        </style>
    </asp:Content>

    <asp:Content contentplaceholderid="Content2" runat="Server">

        <asp:UpdatePanel ID="UpdatePanel1" runat="server">

        <ContentTemplate>

            <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </asp:ToolkitScriptManager>

..................

like image 940
stroopwafel Avatar asked Dec 20 '22 21:12

stroopwafel


2 Answers

Here is the answer. Apparently this was missing. Did as instructed and it worked. Install AjaxMin package

Thanks to all who commented!

like image 114
stroopwafel Avatar answered Dec 22 '22 11:12

stroopwafel


Referencing the AjaxMin.dll did it for me. It comes with the Ajax download: http://ajaxcontroltoolkit.codeplex.com/releases/view/612416

like image 42
Ben Avatar answered Dec 22 '22 10:12

Ben