Powershell - Create Azure Deployment Package

蓝咒 提交于 2019-12-06 09:58:58

问题


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.


回答1:


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.




回答2:


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.




回答3:


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 }


来源:https://stackoverflow.com/questions/15717385/powershell-create-azure-deployment-package

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!