Kentico provides a way to store virtual objects in the file system in addition to the database. This can be useful if you need to prepare your site for deployment, or if you want to manage the code of objects using a source control system.
Virtual objects that require compilation include the following:
To deploy a website to another system:
Open the System application.
Select the Virtual objects tab.
Click Store all virtual objects in file system.
Publish (and compile) the files in Visual Studio. See Publishing projects from Visual Studio for more information.
When deployment mode is OFF:
When deployment mode is ON:
Limitations
Error when disabling deployment mode
When disabling deployment mode (returning virtual files to the database), you may encounter the "The directory is not empty." error. This occurs if the web application is currently using some of the virtual files, and cannot delete the content of the CMSVirtualFiles folder as a result.
The error does not affect the functionality of virtual files – the system correctly disables deployment mode and all virtual file data is returned to the database. The only consequence is that the CMSVirtualFiles folder and some of its content remain on your file system. You can try deleting the folder manually at a later point.
If your project was installed as a web application, you need to perform additional steps after enabling deployment mode:
The deployed files are now integrated in your web application project. Objects that have code behind files (Web part layouts) are converted to the web application format with designer files.