views:

355

answers:

3

I have created a WCF application (the one with .svc file). When I build this project, only bunch of DLLs are created but to be able to host it in IIS, I have to use publish option (right click the project and publish). This generates DLLs, copies app.config and .svc file. This bunch now can be hosted in IIS.

I want Visual studio to publish whenever i build the project. How can I do it?

A: 

how about: a post-build event, running msbuild /target:Publish.

Cheeso
+1  A: 

You could also look at adding a Web Application Project and couple it with a web deployment project then when you build the solution the output of the web deployment project should be the same as publish operation - this approach is also much easier to use in a continuous integration environment such as cruise control.net

Richard
A: 

i gave this a try a and ended up with recursive compile of the solution a good way to lock the compile box :) still no good solution for me