SlowCheetah Transformations for Config Files
Hi, we use Visual Studio transformations for managing our web.config file for our different environments (development, test, and production) -- it works well for both SVN and deployment.
We would like to use SlowCheetah to manage the Sitefinity config files (Configuration folder) in the same manner. SlowCheetah should be able to "transform your app.config or any other XML file based on the build configuration." I can successfully create the transform files for each environment but Visual Studio/SlowCheetah will not transform Telerik's config files based on the build configuration when I deploy the project. Is there a way to allow SlowCheetah to transform these config files?
Thanks,
Devin
Hello Devin,
I have replied in the support ticket you have submitted related to this and I am pasting the reply here as well:
Please note that using the SlowCheetah tool in Visual Studio for transforming configuration files is not tested with Sitefinity projects and it is not officially supported.
The supported way to deploy your Sitefinity project to a production environment is by following the instructions in the following article in order to avoid any issues.
In addition to this, the best approach to move a project from one environment to another is to copy over the solution folder, create a backup of the database and restore it in the new environment in order to make sure that all the files are moved properly. After you copy the solution folder and database from the development environment and restore the project files and the database in the production environment, you need to fix the connection string to point to the database in the production environment and make any other changes in the configurations if needed.
The next step will be to run the project locally in the new environment and if it runs properly then you can also set the project on IIS.
You may also take a look at the following documentation articles for more details about how to configure IIS to host Sitefinity projects and to run projects on IIS:
http://docs.sitefinity.com/configure-the-iis-to-host-sitefinity-projects
http://docs.sitefinity.com/run-projects-on-iis-7-0-and-above
Regards,
Sabrie Nedzhip
Telerik
Sabrie, thank you for your reply. Unfortunately, the process outlined in your documentation falls short in our multi-developer, multi-environment situation. Our environments include production, testing, and development; and local development for each developer. In an ideal world, a deployment would consist of backing up / restoring the database, copying the project files, and updating <add connectionString ...> in DataConfig.config. However, each of our environments has additional unique settings such as the STS setting for <federatedAuthentication> in web.config, the STS settings for <securityTokenIssuers> and <relyingParties> in SecurityConfig.config, <smtpSettings> in SystemConfig.config, <add defaultSenderEmailAddress ...> in NotificationsConfig.config, etc. -- not to mention the headache of config file tracking, versioning, and merging that's required as multiple developers promote their local changes to the central development environment and then up to the other environments.
SiteSync does not work for us because it does not work with HTTPS login, I could not get it to authenticate with our LDAP, it only syncs one way, etc.
In my opinion, if we're going to work with config files we need to have config files for each environment -- but the config files need to be versioned and easily merged, which Visual Studio and a versioning tool can do. And if we're not going to put all the configurations in web.config so that we can use the standard transformation functionality in Visual Studio, a solution like SlowCheetah is needed to produce environmental versions of those config files.
Thanks,
Devin
Devin,
I've used SlowCheetah in the past so, you're not alone. :)
If you're deploying from Visual Studio, the transforms should be working. If you're not using VS to deploy, there is a NuGet package [for SlowCheetah] that I had to add to the project in order to get the transforms.
Hi Tim,
Thanks for your reply. I installed the SlowCheetah extension to Visual Studio, installed the NuGet package to my Visual Studio project, and configured transformations for a number of the .config files in the Configuration folder -- but when I publish, the transformation of the .config files in the Configuration folder does not occur. Is there something I'm missing?
Thanks,
Devin
Additional experimentation yielded the solution. The following three elements need to be installed:
Devin