2

I'm using ASP.NET MVC 4, .NET 4.5.

Here's the bundle I'm adding:

bundles.Add( new StyleBundle( "~/Content/css" ).Include(
                        "~/Content/bootstrap/css/bootstrap.css",
                        "~/Content/bootstrap/css/bootstrap-responsive.css",
                        "~/Content/site.css" ) );

Here's the link to the CSS that gets generated from this bundle:

<link href="/Content/css?v=8HZAB6C8ZnrIPYNFzMQKt0AR4AUsUYBjxPPkbGSRIZo1" rel="stylesheet">

My problem is I'm modifying bootstrap.css which is part of the bundle and it is not generating a new token for the v querystring var so it pulls up the old version.

I've tried forcing an application restart to get the asp.net optimization framework to figure out that I have changed this file but it's not happening...

Any help is greatly appreciated, Thanks!

1 Answer 1

1

Okay, after another hour of trial and error this morning I was able to figure out the cause of this problem.

In the same directory where bootstrap.css was located I also had a copy of bootstrap.min.css from the original download. So once I removed the .min file it has started to pick up my changes during the bundling and minification process.

Hope this helps someone else.

Sign up to request clarification or add additional context in comments.

1 Comment

Ran into a similar problem today. It turns out that the default behavior is to use the .min versions of the files if they are present. You have to remove the files as you have done, or set usePreMinifiedFiles="false" in your Web.config. Shame on Microsoft.

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.