Compile Kentico Web Site from Command Line

In IIS we have the following tree:

Current Connection
    Application Pools
    Sites
        Default Web Site
        OurKentico

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

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.