I have Blazor core 3.1 project and use RadzenBlazor as external library as I did small changes in source code.
Very often I received the next error
Error MSB3073 The command "dotnet tool run webcompiler -r themes -o wwwroot/css -z disable -m disable -p disable" exited with code -532462766. Radzen.Blazor xxx\Radzen.Blazor\Radzen.Blazor.csproj 68
while
Target PreBuild:
1> Unhandled exception. System.IO.IOException: The process cannot access the file 'xxx\Radzen.Blazor\themes\dark-base.css' because it is being used by another process.
It could be different css files.
Look like as racing problem. Sometimes there is nothing, sometimes after pause build working again, sometimes I need to restart Visual Studio.
We are aware of this issue but unfortunately don't know how to solve it. The webcompiler tool (which is used to build the Radzen themes) sometimes just fails with unpredictable errors. Usually rebuilding or restarting Visual Studio helps.
Yes, of course, but it's annoying. I thinking about how to disable prebuild action if nothing to build.
I had a similar problem but the error code was 1, and it occurred in the line: dotnet tool run webcompiler -r themes -o wwwroot/css -z disable -m disable -p disable
I fixed it by changing in the file Radzen.Blazor.csproj for dotnet webcompiler -r themes -o wwwroot/css -z disable -m disable -p disable
And I compile correctly, for this I first had to redo the tool-manifest and restore the tool
The information is taken from the official documentation of the project on Github:
excubo-ag/WebCompiler (github.com)