My ASP.Net project is working well, when suddenly we had a power failure. When I ran my web app, it is now showing a lot of
Could not load assembly S
I had a similar situation, but mine happened after I tried to update DotNetOpenAuth.Core. First it said I needed to update NuGet, which I did, then I updated OpenAuth. After that I started getting the "'jquery' is not a valid script name. The name must end in '.js'.".
If I removed the line adding the jquery bundle, it would happen on jquery-ui etc.
I uninstalled and reinstalled both the AspNet.ScriptManager.jQuery and AspNet.ScriptManager.Bootstrap packages (as it would eventually complain about that), and still no luck.
Final step I did was to uninstall and reinstall AjaxControlToolkit from the package manager console and that fixed it for me.
I had a similar situation and already had the script reference (above) but I also needed to make sure that the dll was copied to the local folder.
F4 on AspNet.ScriptManager.jQuery and AspNet.ScriptManager.jQuery.UI.Combined and set Copy Local to True.
may be a little late to the party but I had the same problem and tried numerous solutions as per above and on other pages. I would get the error on the last script reference, no matter what that reference was. I finally decided to remove all the script references and use bundles instead. For example, default application has the following in bundles.config:
bundles.Add(new ScriptBundle("~/bundles/MsAjaxJs").Include(
"~/Scripts/WebForms/MsAjax/MicrosoftAjax.js",
ScriptManager.ScriptResourceMapping.AddDefinition(
"respond",
new ScriptResourceDefinition
{
Path = "~/Scripts/respond.min.js",
DebugPath = "~/Scripts/respond.js",
}
);
So I changed 'respond' to a bundle instead of a script reference:
bundles.Add(new ScriptBundle("~/bundles/respond").Include(
"~/Scripts/respond-1.4.2.js"));
along with all other script references, and added them to the master page header:
<asp:PlaceHolder runat="server">
<%: Scripts.Render("~/bundles/WebFormsJs") %>
<%: Scripts.Render("~/bundles/MsAjaxJs") %>
<%: Scripts.Render("~/bundles/jquery") %>
<%: Scripts.Render("~/bundles/jqueryui") %>
<%: Scripts.Render("~/bundles/modernizr") %>
<%: Scripts.Render("~/bundles/respond") %>
</asp:PlaceHolder>
This removed the error - finally after 2 days - and allowed me to run some basic pages, including the default Register.aspx page. Not sure what I'll run into next but figured I would pass this along.
This fixed my issue. Add this BundleConfig.cs Check your paths.
ScriptManager.ScriptResourceMapping.AddDefinition("bootstrap", new ScriptResourceDefinition {
Path = "~/scripts/bootstrap.min.js",
DebugPath = "~/scripts/bootstrap.js",
LoadSuccessExpression = "bootstrap"});
And kept this in the ScriptManager on the site.master
<asp:ScriptReference Name="bootstrap" />
Follow this article for more clarity if needed