views:

1484

answers:

2

I am in the process of setting up some IIS hosted WCF projects for continuous integration and am stuck trying to find the best and simplest way to get deployment automated.

Right now, I have the build and deploy working with CC.NET, MSBUILD and a batch file that copies the necessary files to the deployment folder, but I think there must be a better way.

Ideally, I'd like something like web deployment projects, but for WCF.

I would settle for a nice Power Shell script to copy all the necessary files and exclude all the fluff.

+1  A: 

This depends very much on the technologies you are using. On a previous project, we used TFS, with Team Build. The result was that the WCF projects were built into a folder structure that matched they deployment structure. Additional tasks in the MSBUILD script triggered a deployment script (written in PERL, I think). This took care of all deployment tasks, from deleting old folders, creating the new, creating databases and populating with reference data, then deploying the service and web sites, and finally running Installation Verification scripts and publishing the results to a web site.

On the other hand, if all you've got is a hammer, then hammer away.

John Saunders
So, basically you used a batch file. That may be what we stick with.
Stever B
No, we used MSBUILD and a PERL script. It's a bit easier to do complicated tasks when you have decent programming constructs as in PERL.
John Saunders
+1  A: 

Well, there isn't anything stopping you from using a web deployment project for hosting your WCF class library. The SVC file will be picked up by IIS and routed appropriately. We use a standard deployment project and a custom action to create the IIS vroot so that we have a finer control over the settings but a standard web deployment project will do the job as well.

Unless you are running under IIS7 then as far as IIS is concerned it's just standard content that has it's own handler. When you get to Windows 2008 / Windows 7 Beta then things can change a bit as those versions have a very different handler model.

I've found this post to be really helpful: http://msdn.microsoft.com/en-us/library/bb332338.aspx

Alan Mullett
For some reason I wasn't able to add a web deployment project with WCF on my computer. Turned out I needed to re-install. Thank you.
Stever B