开发者

How do I build and deploy a Windows Service with TFS 2008?

开发者 https://www.devze.com 2023-01-04 22:40 出处:网络
I have a build server with many builds for web sites and web services.I\'m doing some new code using WCF; my new code runs as a Windows Service.

I have a build server with many builds for web sites and web services. I'm doing some new code using WCF; my new code runs as a Windows Service.

Ordinarily, when I make changes to a web site, I "check out" the files I need to edit from TFS, make the changes, "check in" the files, and then perform a build. At this poi开发者_如何学Cnt, my new code is up and running on my development build server. Finally, the code is branched to my staging and production servers.

How do I configure a build to deploy my WCF service in this manner? My concern is that I cannot simply deploy the Windows Service and write over the old copy because the service must be stopped first and then restarted. How do I do this?


You can add a set of exec tasks to your build script (*.*proj file) to stop the service before you overwrite it.

See the NET STOP command for stopping a service: http://technet.microsoft.com/en-us/library/bb490715.aspx

0

精彩评论

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

关注公众号