I'm using the new Bundling and Minification in ASP.NET 4.5 Web Forms application. UnobtrusiveValidationMode requires a jquery ScriptResourceMapping to work, but I'm registering it through the ScriptBundle config.
I'm using like this:
bundles.Add(new ScriptBundle("~/Content/Scripts").Include("~/Content/jquery-1.9.0.js"));
But this generates an error:
WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping for 'jquery'. Please add a ScriptResourceMapping named jquery(case-sensitive).
To fixing the error, this:
ScriptManager.ScriptResourceMapping.AddDefinition("jquery", new ScriptResourceDefinition { Path = "~/Content/jquery-1.9.0.js" });
But I want to use Bundling and Minification to combine and minimize all application scripts (in this example I use just jquery file to be more simple). What's the best solution to this case?