Javascript “WebFormsBundle”不是有效的脚本名称。名称必须以“.js”结尾

Javascript “WebFormsBundle”不是有效的脚本名称。名称必须以“.js”结尾,javascript,.net,visual-studio,Javascript,.net,Visual Studio,如何解决此错误 起初申请还可以,但我不知道发生了什么。 我已经正确地安装了软件包和参考资料 这是我理解的错误部分 <asp:ScriptManager runat="server"> <Scripts> <%--To learn more about bundling scripts in ScriptManager see http://go.microsoft.com/fwlink/?LinkI

如何解决此错误

起初申请还可以,但我不知道发生了什么。 我已经正确地安装了软件包和参考资料

这是我理解的错误部分

      <asp:ScriptManager runat="server">
        <Scripts>
            <%--To learn more about bundling scripts in ScriptManager see 
       http://go.microsoft.com/fwlink/?LinkID=301884 --%>
            <%--Framework Scripts--%>
            <asp:ScriptReference Name="MsAjaxBundle" />
            <asp:ScriptReference Name="jquery" />
            <asp:ScriptReference Name="bootstrap" />
            <asp:ScriptReference Name="respond" />
            <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="WebFormsBundle"/>
            <%--Site Scripts--%>
        </Scripts>
    </asp:ScriptManager>

最后我自己得到了解决方案,只需按照下面的步骤来解决问题

如果尚未安装Microsoft.ScriptManager.WebForms软件包,请在软件包管理器控制台中执行以下命令 安装软件包Microsoft.ScriptManager.WebForms-版本1.0.1

然后在PackageManager控制台中执行下面的命令重新安装它 更新包-重新安装Microsoft.ScriptManager.WebForms


最后我自己得到了解决方案,只需按照下面的步骤来解决问题

如果尚未安装Microsoft.ScriptManager.WebForms软件包,请在软件包管理器控制台中执行以下命令 安装软件包Microsoft.ScriptManager.WebForms-版本1.0.1

然后在PackageManager控制台中执行下面的命令重新安装它 更新包-重新安装Microsoft.ScriptManager.WebForms


这个解决方案对我有效:

安装

Microsoft.AspNet.ScriptManager.WebForms


从Nuget右键单击您的解决方案,选择管理Nuget软件包

此解决方案适用于我:

安装

Microsoft.AspNet.ScriptManager.WebForms


从Nuget右键单击您的解决方案,选择管理Nuget软件包

您曾经解决过这个问题吗?我现在也遇到了同样的问题。我也面临着同样的问题,并且无法从任何地方找到解决方案。如果您已经解决了此问题,请分享解决方案。您曾经解决过此问题吗?我现在也遇到了同样的问题。我也面临着同样的问题,并且无法从任何地方找到解决方案。如果您已解决此问题,请分享解决方案。