Bob5421
Bob5421

Reputation: 9073

How to automatically compile less files in an asp.net core project

I have an asp.net core project.

This project contains less style sheet files.

I can see a compilerconfig.json and compilerconfig.json.defaults files at the root of the project.

This 2 files contains less compilation rules.

But when I type "dotnet build", the less files are not compiled in css.

Is there a specific command to type in addition of "dotnet build" ?

Thanks

Upvotes: 6

Views: 1452

Answers (1)

Okan Karadag
Okan Karadag

Reputation: 3045

You can right click compilerconfig.json and enable it. Also it has Ci support.

Nuget Package: source

<PackageReference Include="BuildWebCompiler2022" Version="1.14.8" />

enter image description here

cmd: enter image description here

Upvotes: 4

Related Questions