Richard Szalay
Richard Szalay

Reputation: 84754

Standalone in-place precompilation using aspnet_compiler

aspnet_compiler appears to have two modes:

  1. Target - Entire site is copied to the target folder, PrecompiledApp.config is generated, generated assemblies go into target\bin, views are (optionally) replaced with placeholders
  2. In place - Site is compiled in it's original location, no PrecompiledApp.config is generated, generated assemblies go into Temporary ASP.NET files, views are left as-is

Is it possible to trigger an in-place precompilation but have the generated assemblies + config also affect the original location?

Upvotes: 3

Views: 973

Answers (1)

David Ebbo
David Ebbo

Reputation: 43193

Doing this is not possible. Note that the two modes target very different scenarios:

  1. Target mode is about creating bits that you can then deploy onto a server, such that it won't have to do as much compilation. Note that there are two sub-modes, depending on whether you make it updatable or not (-u switch).
  2. In place mode is simply about warming up a site that is already deployed, such that the first request to it will be faster. Another way to look at it is that it's similar to manually requesting all the pages in your site to warm it up, except with a little less pain.

Note that if you do #1 in non-updatable mode, then even your .aspx (and related) files get modified to become stubs. So clearly, that could not happen in-place as that would end up deleting your original aspx files.

I'm not saying that it would be inconceivable to have some kind of hybrid mode that would do some of what Target mode does and keep it in the in-place bits. It's just not a scenario that the tool is targeting.

Upvotes: 2

Related Questions