Use TeamCity environment variable in MStest


I'm using TeamCity to run my build using VS2010 SLN runner. I'm also using the MSTest integration to run some tests.

My tests require some setup/teardown work which is done by two batch scripts which are defined in an MSTest config file (mstest /runconfig flag)

My problem is, these scripts need to know my source checkout directory However, when this variable is used in my batch scripts it cannot be resolved.

Is there any way I can use these variables in my batch scripts?


"C:\Program Files\Windows Azure SDK\v1.2\bin\csrun.exe" SC.CloudService.csx ServiceConfiguration.cscfg

1 comment
Comment actions Permalink

Where have you put this reference? Those references are only resolved if used in web UI. You may use $(teamcity_build_checkoutDir) msbuild property inside msbuild script. Do you use TeamCity 5.1.x? There were some major improvements of support of .NET 4.0 in 5.1.x


Please sign in to leave a comment.