1

Ok folks, this is what happens:

I have the BundleConfig class registering bundles, like usual:

bundles.Add(
    new ScriptBundle("~/scripts/vendor")
        .Include("~/scripts/jquery-{version}.min.js")
        .Include("~/scripts/bootstrap.min.js"));

That actually does not load the jQuery file, causing bootstrap to not work. BUT, when I replace ".min.js" for ".js", thus using the debug version, everything works just fine, like so:

bundles.Add(
    new ScriptBundle("~/scripts/vendor")
        .Include("~/scripts/jquery-{version}.js")
        .Include("~/scripts/bootstrap.min.js"));

For the record, I got all the files in place; spelling checks; everything is in the same scripts folder.

I don't know what else could be wrong; and I doubt the file from jQuery is corrupted some how, since it was downloaded directly from NuGet!

1 Answer 1

4

To whoever might be interested. I just found out what the problem was; and it was a silly one.

In order for minified files to work correctly, including jquery-{version}.min.js, which was causing me problems, you gotta have debug mode turned off in your web.config file, like so:

<system.web>
    <compilation debug="false" targetFramework="4.5" />
</system.web>

Anyways, problem solved!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.