-1

I use bundling for some .css files in my solution. I have noticed that when I run the solution in "release" mode (with debug="false" in web.config) a .min file is created, if not existing, for each file included in the bundles.

I have made some modifications in Bootstrap.css, and the only way to see these modifications in the minified file (bootstrap.min.css) is to remove it and then to run the solution with debug = "false".

Is there another way in Visual Studio to automatically regenerate the .min files?

EDIT: I was wrong, running the solution with debug = "false" does not automatically create a .min file if it does not exist. So the question is: how can I update the .min files in Visual Studio?

Sean
  • 923
  • 3
  • 14
  • 36

2 Answers2

2

Have a look at http://vswebessentials.com/. It is a VS Extension for helping with web development.

It will minify your css and js files. Bundling won't re-minify already minified files so you should be OK.

ASG
  • 957
  • 9
  • 20
1

I'm using Mads Kristensens Bundler & Minifier and think it is very easy to install and use.

The bundleconfig.json file can be configured to automatically bundle and minify on build in Visual Studio or you can minify manually by right clicking the css file.

More info and download link:

https://visualstudiogallery.msdn.microsoft.com/9ec27da7-e24b-4d56-8064-fd7e88ac1c40

AH.
  • 2,913
  • 1
  • 28
  • 26