Welcome to Shaun Luttin's public notebook. It contains rough, practical notes. The guiding idea is that, despite what marketing tells us, there are no experts at anything. Sharing our half-baked ideas helps everyone. We're all just muddling thru. Find out more about our work at bigfont.ca.

Compile Kentico Web Site from Command Line

Tags: iis, visual-studio, web-development, website, asp.net

In IIS we have the following tree:

Current Connection
    Application Pools
        Default Web Site

The Physical Path to the Kentico site is C:\OurKentico\CMS - it could be anywhere, though. This is the command that we use to compile it in place.

aspnet_compiler.exe -v /OurKentico -p C:\OurKentico\CMS
  • -v The virtual path to the application.
  • -p The physical path to the application.

Since we are not specifying a targetDir in the command, "the application is precompiled in-place." About in-place precompilation, Microsoft says:

If you precompile the site again, only new or changed files are compiled (or those with dependencies on new or changed files). Because of this compiler optimization, it is practical to compile the site after even minor updates.

See this StackOverflow answer for more information and this MSDN Document that talks about in-place precompilation.