开发者

How can MSBuild detect which server it is running on?

I would like my MSbu开发者_StackOverflow社区ild build script to be able to detect which server it is running on, if it is a local developers machine then run the targets that install the results on the local machine, if it is running on the build server then run the target that installs on the remote staging server.

What is the best strategy to achieve this?

We use TeamCity as our CI server.


What we do is have a server property we pass on the command line, dev for installing on the local machine, or the name of the server(s) to publish to if on the build server. This was the only way we could figure out.


have you checked the ServiceController at MSBuild Community Tasks?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜