// @reference "~/bundles/validate"
This is in place to reference the following bundle set up in my CassetteConfiguration.cs:
bundles.Add<ScriptBundle>("~/bundles/validate",
new[]
{
"~/Scripts/jquery.validate.js",
"~/Scripts/jquery.validate.unobtrusive.js"
},
bundle => bundle.PageLocation = "dependsOnCore"
);
The bundles are rendered out in 3 statements in my layout.cshtml which look like this: (2 page locations and 1 standard)
@Bundles.RenderScripts("core")
@Bundles.RenderScripts("dependsOnCore")
@Bundles.RenderScripts()
However, the "~/bundles/validate" bundle does not get automatically pulled in as I would expect. It just gets ignored. I'm working round this by having the following 2 statements in the head of my Edit.cshtml
Bundles.Reference("~/bundles/validate"); // Make sure this bundle is referenced as cannot rely on this: @reference "~/bundles/validate"
Bundles.Reference("~/Scripts/Areas/MyArea/Views/MyEntity/Edit.js");
Am I doing something wrong?
--
You received this message because you are subscribed to the Google Groups "Cassette" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cassette+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.