Building and minification in .NET 7.0
This tutorial explains how to compile and minify CSS and Java script files.
Q. why is it required?
- Increases the speed of our online application while improving rendering.
Q. What exactly are “building” and “minification”?
- Building is the process of joining several files into one. that request can enhance the speed of the first page load.
- Minification is a method for deleting data without causing an application to crash. It eliminates unused space and shrinks a huge number of variable names.
Q. How can this building and minification be included into the application?
Step 1: at the application, click the extension menu at the right side top and then select Manage Extensions.

Step 2: After opening a pop-up window, you can download this extension and type “Bundler & Minifier 2022+” in the top and right corners. After choosing one of the two options after closing the web application, you are done.

Step 3: Launch Visual Studio and open the project. Select the wwwroot folder, followed by the right-click option, Builder & Minifier, and then the minify file.



The two keys in the builderconfig.json file, “inputFiles” and “inputFiles,” are extremely simple to grasp. Each array only contains one file.
Enable bundle on build by selecting Bundler & minifier from the context menu when you right-click on the buildconfig file.

If a NuGet package is not already installed, Visual Studio will download it when you select the ‘Enable bundle on build’ context menu item.

Thanks for reading this Article.