Reputation: 2111
Our project represents a web application on ASP.NET MVC base. It has a lot of configurations in its web.config file: log file location, DB connection string, file storage folders etc.
In general the automatic deployment of such an application is not a big deal. In our case though we have several instances of that application on the same server. So when deploying we have to make a lot of changes in the config file of each instance (adapt DB connection string, file storage folders and all the stuff).
Currently we're using a custom deployment tool, but it's too buggy and I can't rely on it. So I'm searching for a better tool or combination of tool that can be used in our scenarion.
In general it should allow: * automatic deployment to all the instances on the server * specific manipulation on the config file of every single instance (e.g. XPath, XML Element replacement)
Upvotes: 1
Views: 119
Reputation: 9190
Have you looked into using the transform capability built into visual studio and msbuild. This allows you to specify different transforms for your config files, producing output configs for use in different environments/folders.
You can set this up for app or web.configs. I'm guessing it can be done on any xml file really.
You should also be able to work with msbuild to perform whatever tasks you need beyond the transforms.
MSBuild has many tasks already written for common scenarios.
See this answer to the following SO question for using the transform functionality for app.configs: App.Config Transformation for projects which are not Web Projects in Visual Studio 2010?
Upvotes: 1