I want to Publish my WCF Service Library using MSBuild Command Line with VS2012, i don't want to do right click->Publish Website , instead i want to publish it using Command Prompt(MSBuild).
What are the Pre-requisites required for MSBuild?
I don't have windows azure,it is necessary to install windows azure?
I am new to MSBuild, and I would like step by step instructions on how to accomplish this?
I want the .svc file, all the dll's inside the bin folder and web config file to be present inside the published folder.
I found the answer for my question with the reference as below link, "http://www.asp.net/mvc/tutorials/deployment/visual-studio-web-deployment/command-line-deployment" using the command line "msbuild C:\ContosoUniversity\ContosoUniversity.sln /p:DeployOnBuild=true /p:PublishProfile=Test"
Your solution is fine and will work to deploy directly out to your host (don't forget to include your build Configuration so it publishes the correct config transform).
Another option is to "publish" your site to a local folder and then upload it to your host separately. This also gives you a chance to archive the site in a zip, do post checks and troubleshoot.
You can do this like so:
<MSBuild Projects="WebProject.csproj"
Targets="Rebuild;_WPPCopyWebApplication"
Properties="WebProjectOutputDir=WebProject\;UseWPP_CopyWebApplication=True;PipelineDependsOnBuild=False;" />
If you get stuck there are more details on publishing WCF, ASP.NET and MVC projects.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With