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?
精彩评论