During my publish build, the CPU usage is 50%. The build takes about half an hour, so I wanted to test it with more cores. I tried dotnet publish --configuration Release --aot --runtime wasm --readytorun --maxparallelism 4 -o ./bin/release/net7.0/browser-wasm/publish but there was the error message "Unknown switch --aot". Probably, I do not need --aot, because my project file contains
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<RunAOTCompilation>true</RunAOTCompilation>
</PropertyGroup>
When I delete --aot, the error message is almost the same: "Unknown switch --readytorun". So, I added <RunReadyToRun>true</RunReadyToRun> to the PropertyGroup and deleted --readytorun. Now the error message is "Unknown switch --maxparallelism". I deleted --maxparallelism and added <MaxParallelism>4</MaxParallelism> to the PropertyGroup but I think this is simply ignored as <MaxParallelism> does not exist.
Is there a way, to achieve compilation with 4 cores?