I'm using TeamCity 8 to run a msbuild script.

I thought TeamCity would set an environment variable or msbuild property with the vcs root url. But I can't find it.

I've tried running the script with /v:diag to get more info, and still can't find any property.

Can I get the url from Teamcity or do I have to run something like svn.exe info?

有帮助吗?

解决方案

Here is what I'm currently doing.

TeamCity does have the variable, it's named %vcsroot.url%, but it's available to scrips as default.

To make it available in the msbuild script (and other types as well).

Goto project settings -> Parameters -> Add new parameter

Name: system.vcsroot.url
Kind: System property
Value: %vcsroot.url%

And you have property as $(vcsroot_url) in msbuild

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top