【发布时间】:2011-11-30 01:09:58
【问题描述】:
我正在考虑将我们的系统迁移到 Windows Azure。目前,我们有一个自动化流程,可以使用 Team City 和 NAnt 为我们构建所有内容并将其打包到 msi 中。
有什么方法可以构建部署所需的包 - 我不需要它来部署,只需创建包。
谢谢
学习
【问题讨论】:
标签: .net build azure cloud nant
我正在考虑将我们的系统迁移到 Windows Azure。目前,我们有一个自动化流程,可以使用 Team City 和 NAnt 为我们构建所有内容并将其打包到 msi 中。
有什么方法可以构建部署所需的包 - 我不需要它来部署,只需创建包。
谢谢
学习
【问题讨论】:
标签: .net build azure cloud nant
有:用 MSBuild
msbuild AzureProject.ccproj /target:publish /p:Configuration=Release;TargetProfile=ReleaseProfile
将使用“Release”配置和“ReleaseProfile”Azure 配置文件创建一个 Azure 包。
注意,如果您的 Azure 项目位于解决方案文件夹(例如“文件夹”)中,您将需要例如
msbuild folder\AzureProject.ccproj /target:publish /p:Configuration=Release;TargetProfile=ReleaseProfile
【讨论】:
是的,直接向您的 NANT 文件中添加一些命令来打包您的应用程序。
有关示例和参考,请参阅此页面:
http://msdn.microsoft.com/en-us/library/windowsazure/gg432988.aspx
【讨论】:
这是我使用的:
<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>
【讨论】: