locked
Autocomplete errors from asp 4.5 RRS feed

  • Question

  • User446859115 posted

    While trying to debug a user module that I've attempted to "import" from a previous version of my code generated under asp 4.0.

    during single stepping VS12 comes back with "You need to find AutoCompleteExtender.cs to view source...." and

    Locating source for 'C:\Users\Stephen\Documents\Repos\Superexpert\AjaxControlToolkit\Server\AjaxControlToolkit\AutoComplete\AutoCompleteExtender.cs'. Checksum: MD5 {80 e2 af c5 7 7d 5b 4e fb b0 dc 64 1a 1b 2f bc} The file 'C:\Users\Stephen\Documents\Repos\Superexpert\AjaxControlToolkit\Server\AjaxControlToolkit\AutoComplete\AutoCompleteExtender.cs' does not exist. Looking in script documents for 'C:\Users\Stephen\Documents\Repos\Superexpert\AjaxControlToolkit\Server\AjaxControlToolkit\AutoComplete\AutoCompleteExtender.cs'... Looking in the projects for 'C:\Users\Stephen\Documents\Repos\Superexpert\AjaxControlToolkit\Server\AjaxControlToolkit\AutoComplete\AutoCompleteExtender.cs'. The file was not found in a project. Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\crt\src\'... Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\crt\src\vccorlib\'... Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\src\mfc\'... Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\src\atl\'... Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\include'... The debug source files settings for the active solution indicate that the debugger will not ask the user to find the file: C:\Users\Stephen\Documents\Repos\Superexpert\AjaxControlToolkit\Server\AjaxControlToolkit\AutoComplete\AutoCompleteExtender.cs. The debugger could not locate the source file 'C:\Users\Stephen\Documents\Repos\Superexpert\AjaxControlToolkit\Server\AjaxControlToolkit\AutoComplete\AutoCompleteExtender.cs'.

     

    What gives? and how to I deternmine what's causing the problem?

    Tuesday, October 1, 2013 5:31 PM

Answers

All replies

  • User1070236303 posted

    The AjaxControlToolkit has specific versions for .net 4.0 and 4.5. If you install it via nuget you will get the 4.5 version regardless when your project targeted 4.0.

    You need to install the correct version which is compatible with your module.

    install-package AjaxControlToolkit -Version 4.1.51116

    http://forums.asp.net/t/1875447.aspx?aspnetcompiler+badly+broken+after+installing+vs+2012+update+1

    Wednesday, October 2, 2013 2:22 AM
  • User446859115 posted

    Ok, I updated things via nuget, But I'm still getting some possibly worrysome warnings. I had to retarget to ASP.NET 4.0 as my Network admin tells me that the datacenter servers are only configured for 4.0, Do I need to worry about these warnings?

    Warning 12 The primary reference "Microsoft.ScriptManager.WebForms, Version=4.5.6.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" could not be resolved because it was built against the ".NETFramework,Version=v4.5" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0". vpsManager

    Warning 13 The primary reference "Microsoft.AspNet.Membership.OpenAuth, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" could not be resolved because it was built against the ".NETFramework,Version=v4.5" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0". vpsManager

    We don't use the Oauth functions, Is there a simple way to remove it from the project?

    What else do I need to do to resolve these warnings?

     

    Wednesday, October 2, 2013 12:56 PM
  • User-1913497086 posted

    yes you need to be worried about 

    and you may ask you network administrator to upgrade it to 4.5 ,!

    Wednesday, October 2, 2013 2:15 PM
  • User-1360095595 posted

    Yes, you do, and since you're back to using 4.0, you need to use the 4.0 references for both of these.

    Wednesday, October 2, 2013 2:36 PM
  • User446859115 posted

    Ok, clean those up, now it "compiles" but when I run it I get '

    MsAjaxBundle' is not a valid script name.  The name must end in '.js'.

     

    Which looks like it comes from one of the script manger bundles in site.master. Problem is I don't understand how this "bundle" is created and why.

     

    Wednesday, October 2, 2013 4:32 PM
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, October 2, 2013 4:39 PM
  • User446859115 posted

    Thanks your suggestion moved me along to the next step. I still seem to be having version conflicts.

    This is the next bump in the road:

    The assembly 'AjaxControlToolkit, Version=4.1.7.930, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e' does not contain a Web resource that has the name 'WebForms.js'. Make sure that the resource name is spelled correctly.

    Still coming from the (now called)  ToolScriptManager section of site.master.

    The WebForms.js does exist in the scripts/WebForms directory on my project.

    This is what I've got in site.master:

     <ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
            <Scripts>
                <%--To learn more about bundling scripts in ScriptManager see http://go.microsoft.com/fwlink/?LinkID=272931&clcid=0x409 --%>
                <%--Framework Scripts--%>
                
                <%--<asp:ScriptReference Name="MsAjaxBundle" />--%>
                <asp:ScriptReference Name="jquery" />
                <asp:ScriptReference Name="jquery.ui.combined" />
                <%--<asp:ScriptReference Name="WebForms.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebForms.js" />
                <asp:ScriptReference Name="WebUIValidation.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebUIValidation.js" />
                <asp:ScriptReference Name="MenuStandards.js" Assembly="System.Web" Path="~/Scripts/WebForms/MenuStandards.js" />
                <asp:ScriptReference Name="GridView.js" Assembly="System.Web" Path="~/Scripts/WebForms/GridView.js" />
                <asp:ScriptReference Name="DetailsView.js" Assembly="System.Web" Path="~/Scripts/WebForms/DetailsView.js" />
                <asp:ScriptReference Name="TreeView.js" Assembly="System.Web" Path="~/Scripts/WebForms/TreeView.js" />
                <asp:ScriptReference Name="WebParts.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebParts.js" />
                <asp:ScriptReference Name="Focus.js" Assembly="System.Web" Path="~/Scripts/WebForms/Focus.js" />--%>
                <asp:ScriptReference Name="WebForms.js"  Path="~/Scripts/WebForms/WebForms.js" />
                <asp:ScriptReference Name="WebUIValidation.js"  Path="~/Scripts/WebForms/WebUIValidation.js" />
                <asp:ScriptReference Name="MenuStandards.js"  Path="~/Scripts/WebForms/MenuStandards.js" />
                <asp:ScriptReference Name="GridView.js"  Path="~/Scripts/WebForms/GridView.js" />
                <asp:ScriptReference Name="DetailsView.js"  Path="~/Scripts/WebForms/DetailsView.js" />
                <asp:ScriptReference Name="TreeView.js"  Path="~/Scripts/WebForms/TreeView.js" />
                <asp:ScriptReference Name="WebParts.js"  Path="~/Scripts/WebForms/WebParts.js" />
                <asp:ScriptReference Name="Focus.js"  Path="~/Scripts/WebForms/Focus.js" />
                <asp:ScriptReference Name="WebFormsBundle" />
                <%--Site Scripts--%>
    
            </Scripts>
        </ajaxToolkit:ToolkitScriptManager>

    and this is the assemblies section in my web.config:

     <compilation debug="true" targetFramework="4.0">
          <assemblies>
            <add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
            <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
            <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
            <add assembly="System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
            <add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
          </assemblies>
        </compilation>

    Thanks for your help so far. Hopefully with a little more I can get this code to run today.


     

     

     

    Wednesday, October 2, 2013 5:17 PM
  • User446859115 posted

    ok, another turn of the screw....

    If I add back into the ToolScriptManager script references the assembly attributes, I get past various control JS modules and now get halted on the WebFormsBundle ScriptReference.

     

    Wednesday, October 2, 2013 5:33 PM
  • User446859115 posted

    The code runs if I comment out the scriptReference from the ToolkitScriptManager

    <asp:ScriptReference Name="WebFormsBundle"/>

    Now at least I can start to debug "my" code.

    I feel like I've hacked this template to get it to run without really knowing what side effects I've created down the road.

     

    Wednesday, October 2, 2013 5:53 PM