Building and minification in .NET 7.0

Solgamahardik
3 min readAug 31, 2023

--

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.

Image : 1

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.

Image : 2

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.

Image : 3
Image : 4
Image : 5

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.

Image : 6

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

Image : 7

Thanks for reading this Article.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Solgamahardik
Solgamahardik

Written by Solgamahardik

👨‍💻 .NET developer with 7 years of experience, I thrive on crafting robust and efficient solutions that bridge the gap between ideas and implementation.

No responses yet

Write a response