Search code examples
c#asp.net-mvc.net-corebundling-and-minification

BuildBunderMinifier in .Net Core Auto Build


I am building C#/MVC web apps, and have used BundleConfig.cs in past C# MVC .Net Framework projects, using the RegisterBundles library to minify CSS and JavaScript files. While developing/debugging, it never required me to restart and rebuild the project after CSS or Javascript file changes were made. Now that I am moving to .Net Core, the BuildBunderMinifier NuGet package requires me to stop a project, rebuild, start the project, and force refresh a page every time I make any change in CSS. Is there any way to make changes in CSS and see the result without having to stop/rebuild/restart every time?

Edit: Installing BroswerLink does not resolve the issue.


Solution

  • The solution was easy: Install the BundleMinifier extension, in addition to enabling Browser Link. It was not obvious at first, because after installing BundleMinifier, I had to then select "Update Bundles" from the project's context menu. After that, the CSS changes were rendered automatically after every save.