In the commands given above for running the aspnet_compiler, it's not clear how to specify the virtual directory of the website. The command to publish to a virtual directory on a local machine (developer machine, e.g. for testing) should read something like
aspnet_compiler -p C:\MyAppUI -v //localhost/MyVirtualDir C:\MyOutputPath
where MyAppUI is the physical path of the source code files of the website, //localhost/MyVirtualDir is the virtual directory set up in IIS and MyOutputPath is the physical path of the compiled application. Note that the virtual directory must point to C:\MyOutputPath