1

I have an old WCF Self-Hosted service (wcf service library project) So far, this has been published manually in visual studio by right clicking the project, and selecting "Publish".

But I now want to automate this process in teamcity, but there is no "Package" target, so the build fails.

Does teamcity support this kind of projects, or am I forced to keep doing this manually? If it does support it, how?

Morten Nilsen
  • 621
  • 7
  • 18
  • Refer to this link on how you can publish your WCF service from TeamCity : http://confluence.jetbrains.com/display/TCD8/Continuous+Delivery+to+Windows+Azure+Web+Sites+(or+IIS). The example used is for asp.net websites and should be similar for WCF service as well – Rajesh Jun 08 '15 at 12:55
  • No, that guide won't work, as this is not a ASP.NET application. There is no "Package" target, nor a "deploy" context menu option, only a "publish". – Morten Nilsen Jun 10 '15 at 13:28
  • Does your publish mean to deploy the updated WCF components from each successful build to a specific server in the network? – Rajesh Jun 10 '15 at 13:33
  • The publish feature on a wcf service library generates the .svc files and web.config based on app.config and puts the dlls in bin/ and other content artifacts from the project in the target folder. It is looking like one solution is to publish the library to a web project in the same solution and then publish that container project, though this feels a bit dirty to me. Ideally, teamcity should respond to changes in app.config without having to manually publish the site to a web project - but at least it's a working solution. Something for JetBrains to improve? – Morten Nilsen Jun 10 '15 at 13:47
  • Have you tried using msbuild to publish your WCF service library project? – Rajesh Jun 10 '15 at 13:58
  • As far as I can tell, there is no build target for the "publish" feature when you right click a project in VS, the only information I found on google was that this publish option is a feature built into VS. – Morten Nilsen Jun 11 '15 at 07:00

1 Answers1

2

The only workable solution I found was to create an empty web project and then publish the WCF Service library to that folder, then add the SVC files to the project and have Teamcity publish that.

Morten Nilsen
  • 621
  • 7
  • 18