after migration from .net core 2.1 to .net core 6.0, the build time became slow,takes about 1:30 (1 minute and 30 seconds) . by using MSBuild Log Viewer (https://msbuildlog.com/) the result was that most expensive task is CoreCompile, it takes (1:22) from (1:30) (can see build logs image below).
and in output window can see the build stuck in
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\csc.exe
after Determine the most expensive task what is the next step to reduce the build time ? Any help would be much appreciated.
important notice (the build time for same project using same MSBuild in version .net core 2.1 is ( 16 seconds only ) but after migrate to .net core 6.0 for the project build time is ( 1:30 ))
Roslyn\csc.exe
looks like compiler itself, so I would not say that you have determined the issue. – Kinematicscsc.exe
and compile again? – Maritamaritainbin
andobj
folders from the solution (or if you use git - commit all changes to the branch and dogit clean -fdx
) and rebuild the solution. – Kinematics