3

I've a web solution with 4 web projects. On successful build I need to create a azure deployment package via powershell.

Could someone help me whether we can create a azure deployment packages (cspkg, csdef and cscfg).

Thanks.

Nil Pun
  • 17,035
  • 39
  • 172
  • 294

3 Answers3

3

Here is a good example: Windows Azure 4: Deploying via PowerShell

Also: Publish a Package using a Powershell Script

This describe the process in detail.

Simon Opelt
  • 6,136
  • 2
  • 35
  • 66
AbhishekAnand
  • 132
  • 1
  • 3
1

For this, your solution must contain cloud projects so that your projects are enabled to be deployed in Windows Azure. See this guide for a step-by-step approach to do so: http://msdn.microsoft.com/en-us/library/windowsazure/hh420322.aspx. Then, when you build your cloud projects (either through msbuild or directly through Visual Studio), you'll get package files.

Gaurav Mantri
  • 128,066
  • 12
  • 206
  • 241
1

I wrote an article about build package files and uploading them to Azure using Powershell which might be useful:

http://www.kenneth-truyers.net/2014/02/06/deploying-cloud-services-to-azure-with-powershell/

Creating a package is rather simple. You can use Msbuild for that:

exec { msbuild <path-to-csproj> /p:Configuration=Release 
                                /p:DebugType=None
                                /p:Platform=AnyCpu
                                /p:OutputPath=<path-to-package>
                                /p:TargetProfile=Cloud
                                /t:publish
                                /verbosity:quiet }
Kenneth
  • 28,294
  • 6
  • 61
  • 84