Reputation: 69928
I'm using TeamCity (TeamCity Enterprise 10.0.4 (build 42538)
) as a build server and SlowCheetah for config transformations. My solution consist of one ASP.NET Web API 2
project and one Console application
.
For my console application the transformation works flawlessly for Release configuration. This is done via the Visual Studio
runner set for Microsoft Visual Studio 2015
.
However for publishing I use the MSBuild runner instead and here transformation does not work at all. I need to transform both a web.config file and separate password.config file. I'm using SlowCheetah 2.5.48. When publishing through Visual Studio in my development environment transformation works flawlessly as well.
Upvotes: 1
Views: 1714
Reputation: 69928
Solved it by adding two system properties, added system.PublishUrl
to have separate folder from development environment but it is not needed.
Needed parameters:
system.PublishProfile
- set to the value of your PublishProfile (such
as Release)system.DeployOnBuild
- set to trueWhen this is done TeamCity will automatically pass these parameters to your Visual Studio build step and transformation now works.
After this I could remove the MSBuild step and only use Visual Studio Runner.
Upvotes: 1