How to improve performance of aspnet_compiler?

Mark Kharitonov 1 Reputation point
2022-05-26T16:40:42.073+00:00

The command line is:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe -v xyz -p D:\_wf\01\69\b\_PublishedWebsites\xyz -fixednames D:\_wf\01\69\b\_PublishedWebsites\xyz_Precompiled

The result is 180 files with the .compiled extension. On the build server this runs for about 28 minutes. Usually we just run the following command:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe -v temp -p D:\_wf\01\69\b\_PublishedWebsites\xyz

And it takes about 14 minutes. Either way it is very long.

I tried to debug the aspnet_compiler and it seems it compiles each of the relevant files one by one.

Our code is Asp.Net, not Asp.Net Core. Is there any solution to this build performance problem?

I have asked a few related questions on the StackOverflow, but got no satisfactory responses:

  1. https://stackoverflow.com/questions/71329184/are-there-any-alternatives-to-aspnet-compiler-when-it-comes-to-build-the-asp-net?r=SearchResults&s=1%7C53.0356
  2. https://stackoverflow.com/questions/70103543/how-to-speed-up-aspnet-compiler-exe?r=SearchResults&s=2%7C13.4642
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
36,001 questions
{count} votes