I'm trying to pre-compile views for our MVC5.1 application to improve first load performance (see this question for more context).
I'm playing with aspnet_compiler.exe
:
aspnet_compiler -p d:/path/to/myapp/ -v myapp
I can definately see the compilation going on - warnings about Obsolete
methods usage. But where does it put the results?
Before the experiment I've cleaned Temporary Asp.Net Files
, just to see the result. And after the compilation finish, nothing happened. Both c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\
and c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\
were still empty.
I also tried executing with exact path for virtual path
aspnet_compiler -p d:/path/to/myapp/ -v d:/tmp/myapp
and that folder was left empty. But second run of the compiler was much quicker, because I did not clean the build. This makes me think the results are available somewhere.
So my questions are: where does it store the results of compilation? and how can I make IIS use these results instead of Just-In-Time compilation?
Update: I have found how to capture the output of compilation. Just specify a path as a last (or first) parameter:
aspnet_compiler -p d:/path/to/myapp/ -v / d:/tmp/myapp
This leave the question, how can I make IIS to pick it up?
Temporaty ASP.Net Files
folder? that was empty for me. I've found how I can specify the target - see update. Question is how I can make IIS to use results of that compilation inTemporaty ASP.Net Files
– Grizzly