What does Aspnet_compiler.exe do?
Asked Answered
G

0

7

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?

Grizzly answered 27/2, 2014 at 12:53 Comment(3)
Perhaps by looking at the folder indicated here #12743521Escapee
you mean 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 in Temporaty ASP.Net FilesGrizzly
I didn't have time to dig into but these two docs should help msdn.microsoft.com/en-us/library/aa479044.aspx msdn.microsoft.com/en-us/library/399f057w%28v=vs.85%29.aspxEscapee

© 2022 - 2024 — McMap. All rights reserved.