2
votes

I have SlowCheetah as part of my TeamCity build process to transform app.config files.

I know that in the case of web applications, running an application in local Visual Studio debugger does NOT transform the relevant web.config. I presumed this behaviour was the same for app.config files but I just found today that when I run a Console or Windows Service application from local VS 2012 (e.g. in Debugger) the app.config is transformed.

Is there a way to prevent the app.config transform occurring when running a non-WAP project in debugger?

1

1 Answers

3
votes

There is an easy way to do this.

Open the csproj file for the project (e.g. Windows Service project) in an editor (You can do right-click|Unload Project in the VS Solution Explorer followed by "Edit Project File" to edit the file contents in Visual Studio).

Look for the line containing the following:

<Import Project="$(SlowCheetahTargets)" Condition="Exists('$(SlowCheetahTargets)')" Label="SlowCheetah" />

and modify it as follows:

<Import Project="$(SlowCheetahTargets)" Condition="Exists('$(SlowCheetahTargets)')and '$(IsDesktopBuild)' == 'false'" Label="SlowCheetah" />

This will disable transforms when you are on your local machine but they will continue to be transformed in a Build Server.