In our automatic build we use MSBuild in combination with web.config transformation to create an acceptance config and a production config.
We have added attributes to change config settings
for example to change the cdn url’s.
<add key="cdn1url" value="http://cdn.acceptance.oursite.com/"
xdt:Transform="SetAttributes"
xdt:Locator="Match(key)" />
Does anybody know if it is possible to add an autoincrement attribute? We want to add +1 to the version attribute (for css/img/js caching) on every production build.
An other option could be the Teamcity build number, but I am not sure if that is possible
3PSat the bottom and then back to3PS: By using
RegexMatchtask you can extract current version and then by incrementing it you’ll get a value for the$(NextVersionNumber)proeprty.