Enable bundling and minification in Visual Studio 2017 for ASP.NET Core 2


Published: 11 September 2017
Author: Jared Holgate
Category: Engineering
Tags: ASP.NET Core 2,Bundling,Minification,Visual Studio 2017,CSS,JavaScript

This article describes the process of enabling bundling and minification;

https://docs.microsoft.com/en-us/aspnet/core/client-side/bundling-and-minification

The basic steps are;

  1. Open the bundleconfig.json file, you will get prompted to download the tooling. Do that.
  2. Right click on bundleconfig.json, select 'Bundler and Minifier' then select 'Update Bundles'. You'll need to do that each time you make a change that you want to deploy.
  3. Optionally select 'Enable bundle on build...' if you want it to re-build the css and js bundles on every build.