Automate WCF Library Publishing Using MSBuild

I searched and could not find anything that was published in this thread. When using Visual Studio 2010 for the WCF library, you can right-click on it and publish the WCF library that generates / creates the .svc and web.config file, and also deploys it. I tried to imitate this in msbuild and was not successful. Is it possible? I have build scripts for deploying a WCF application, a website, and they were not able to use these scripts to successfully deploy the WCF library. When I use them, it compiles the Dll, but not the .svc or web.config file. Any advice would be greatly appreciated.

+6
wcf
source share
3 answers

WCF library publishing is built into Visual Studio, which is not related to MSBuild. Therefore, unless you create your own MSBuild task or model behavior when using other tasks, you cannot do this.

0
source share

You should check out Wix. I believe that it should do what you ask, it's just a huge learning curve.

0
source share

Read the Vishal Joshi blog , it has received some excellent publications on the technologies used to deploy IIS applications (including WCF services hosted on IIS).

Web Packaging: Creating Web Packages Using MSBuild

In a nutshell, the goal of MSBuild Package is your friend. Try creating an ASP.NET or WCF service application using the target / t: Package on the command line.

It will create a zip file and the corresponding .cmd file for execution, which can then be deployed using the command line or even import .zip manually into IIS via MMC. To deploy from MSBuild, you can run this “package” on any server running the Web Deploy service.

You can also check% WINDIR% \ system32 \ inetsrv \ appcmd.exe if you prefer to store application metadata separately (sitename, apppools, acls, destination directories, etc.) and then write MSBuild (or Powershell, bat file and etc.) a script to coordinate the work on setting up and disrupting these assets. See Getting Started with AppCmd.exe for more information .

NTN

Z

0
source share

All Articles