DataFolder config patch for Sitecore Instance Manager (SIM) installs
The Sitecore Instance Manager (SIM) tool is a fantastic tool for quickly setting up local Sitecore installations. I love using it for quick setup when sandbox testing features, or new shared source modules from the community.
It’s so simple that you just click on the ‘Install Instance’ button, fill out the information for the site you want, and off it goes, extracting the webroot, attaching databases, setting up IIS and everything. It’s great!
One thing I found when setting up my sites was that the Data folder was saved within the actual Web.Config, as opposed to it being patched in with an App_Config/Include file.
This was ok for quick sites where I just wanted a blank instance….but commonly I wanted to build a Visual Studio solution over the top of my clean instance. This means that my Web.config file would be stomped with the one from my project….and I’d lose the data folder setting. An example of this is with my LaunchSitecoreTDS solution.
Sitecore developers will know that when you see the following ‘Required licence is missing’ error, that it’s likely to be an issue with the data folder.
So, to fix this, I’d usually have to open the webroot directory, and enable the App_Config/Include/DataFolder.config file, and edit the setting to point to my site’s data folder. Then I could build over the top, and everything would work, as the patch file would properly set my DataFolder setting.
After doing this a couple of times, I decided to make this a step within SIM, so every site I installed would have the patch file enabled, with the correct data folder value in it.
The result was a pipeline processor I inserted after the normal SetDataFolder step in SIM.
I included it in both the Install and Reinstall pipelines. SIM now creates my DataFolder.config patch file (with the correct Data Folder setting) for every install.
The code can be found on my Github repo.
If you just want the patch, copy the files from here and place them in the root SIM folder (overriding the existing Pipelines.config file, which you may want to backup first).
This is for SIM 1.3 – Update-3, and won’t work in previous versions. If you’re after something that will do this in previous versions of SIM, let me know and I’ll see what I can do.
Enjoy!