简体   繁体   English

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

[英]'WebFormsBundle' is not a valid script name. The name must end in '.js'

What can i do to solve this error?我能做些什么来解决这个错误?

在此处输入图片说明

At the first the application was ok but than i dont know what happend.起初,应用程序还可以,但我不知道发生了什么。 i have curectly installed the packages and the references.我已经正确安装了软件包和参考资料。

and here is the part than as i understand gives the error这是比我理解的错误的部分

      <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>

This solution worked for me:这个解决方案对我有用:

Install安装

Microsoft.AspNet.ScriptManager.WebForms Microsoft.AspNet.ScriptManager.WebForms

from Nuget (right-click your solution, select Manage Nuget packages)从 Nuget(右键单击您的解决方案,选择管理 Nuget 包)

Finally I got the solution by myself, Just follow the steps below to solve the problem.最后我自己得到了解决方案,只需按照以下步骤解决问题。

  1. Install the Microsoft.ScriptManager.WebForms package(If you haven't already installed) by executing below command in Package manager console通过在包管理器控制台中执行以下命令来安装 Microsoft.ScriptManager.WebForms 包(如果您尚未安装)

Install-Package Microsoft.ScriptManager.WebForms -Version 1.0.1安装包 Microsoft.ScriptManager.WebForms -Version 1.0.1

  1. Then reinstall it again by executing below command in Package manager console然后通过在包管理器控制台中执行以下命令重新安装它

update-Package -reinstall Microsoft.ScriptManager.WebForms update-Package -reinstall Microsoft.ScriptManager.WebForms

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 “Respond”不是有效的脚本名称,名称必须以 .js 结尾 - Microsoft Tutorial - 'Respond' is not a valid script name, the name must end in .js - Microsoft Tutorial 响应不是有效的脚本名称,名称必须以.js结尾 - Respond is not a valid script name, the name must end in .js 解析服务器Java脚本云代码错误:[TypeError:必须使用ParseObject或类名称来构造ParseQuery。] - Parse server Java script Cloud code Error : [TypeError: A ParseQuery must be constructed with a ParseObject or class name.] 流星运行iOS错误:验证程序包名称时出错。 程序包名称必须类似于:com.company.Name - Meteor run iOS error: Error validating package name. Package name must look like: com.company.Name Node.js HTTP-TypeError:标头名称必须是有效的HTTP令牌 - Node.js HTTP - TypeError: Header name must be a valid HTTP Token 如何在node.js中使用名称中带有斜杠的读取文件。 - How to use read files in node.js that have a slash in the name. 将同名文件放入不同文件中。 GulpJS - Putting into Diffrent Files With same name. GulpJS 获取变量名称。 javascript“反思” - Get variable name. javascript “reflection” 用于验证 URL 或域名的正则表达式。 - Regular Expression to validate a URL or domain name. 对象(字符串或数组)NAME。 如何获得? - Object (string or array) NAME. how to get it?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM