MarkKharitonov-4071 avatar image
0 Votes"
MarkKharitonov-4071 asked MarkKharitonov-4071 commented

How to improve performance of aspnet_compiler?

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:



· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi, the asp.net_compiler.exe tool compiles each ASP.NET page in the project. I suppose its compile time depends on this reason.

0 Votes 0 ·

This does not explain the abyssmal performance. C# compiler also compiles each and every *.cs file in the project, yet it does not take that much time.
Is there an alternative to aspnet_compiler? Someone proposed to use Roslyn to compile templates, but without providing the concrete details on how to actually do it.
The StackExchange team has built their own precompiler, I forked it and tried to use -
But it is too old and unable to cope with all kinds of scenarios, for example -

0 Votes 0 ·

0 Answers