2011-10-03 68 views
1

我正在研究将我们的系统迁移到Windows Azure。目前,我们有一个自动化的流程,它可以构建一切,并使用Team City和NAnt将它打包成为msi。在NAnt构建Azure部署包

是否有任何方法来构建部署所需的包 - 我不需要它来部署,只需创建包。

感谢

斯图

回答

1

是的,直接向您的NANT文件添加一些命令来打包您的应用程序。

看到这个页面的例子和参考:

http://msdn.microsoft.com/en-us/library/windowsazure/gg432988.aspx

+0

感谢所有三个人(他们当然看起来像他们会工作),但我尽量避免MSBuild,因为它对我来说有点“Visual Studio Magical”,我喜欢像我可以做的那样简单的事情。这看起来像我正在寻找的东西。 – Stu

2

有:用的MSBuild

msbuild AzureProject.ccproj /target:publish /p:Configuration=Release;TargetProfile=ReleaseProfile 

将创建一个使用 “释放” 的配置和 “ReleaseProfile” 天青型材蔚蓝的包。

请注意,如果您的Azure项目位于解决方案文件夹(例如“文件夹”)中,您需要

msbuild folder\AzureProject.ccproj /target:publish /p:Configuration=Release;TargetProfile=ReleaseProfile 
0

这是我使用:

<echo message="Publishing Azure Package"/> 
<exec program="${MSBuildPath}" workingdir="${BuildDirectory}" commandline="Products\SportsCommanderV3\SportsCommanderCloudService\SportsCommanderCloudService.ccproj /t:CorePublish /p:Configuration=Release /p:OutDir=${ReleaseDirectory}\${BuildLabel}\Azure\"/> 

的OurDir部分用于在发布该数据包到版本目录我们的服务器上,但截至Azure 1.5 SDK似乎停止工作,所以现在我补充一点:

<copy todir="${ReleaseDirectory}\${BuildLabel}\Azure\Publish"> 
     <fileset basedir="${BuildDirectory}\Products\SportsCommanderV3\SportsCommanderCloudService\bin\Release\app.publish"> 
      <include name="**/*"/> 
     </fileset> 
    </copy>