.net 在NAnt中构建Azure部署包
我正在考虑将我们的系统迁移到WindowsAzure。目前,我们有一个自动化的过程,使用TeamCity和NAnt将所有内容构建并打包到msi中 有没有办法构建部署所需的包?我不需要它来部署,只需要创建包 谢谢.net 在NAnt中构建Azure部署包,.net,build,azure,cloud,nant,.net,Build,Azure,Cloud,Nant,我正在考虑将我们的系统迁移到WindowsAzure。目前,我们有一个自动化的过程,使用TeamCity和NAnt将所有内容构建并打包到msi中 有没有办法构建部署所需的包?我不需要它来部署,只需要创建包 谢谢 Stu有:使用MSBuild msbuild AzureProject.ccproj /target:publish /p:Configuration=Release;TargetProfile=ReleaseProfile 将使用“Release”配置和“ReleaseProfil
Stu有:使用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文件以打包应用程序是很简单的 有关示例和参考,请参见本页: 以下是我使用的:
<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>
多亏了这三个工具(它们看起来确实可以工作),但我尽量避免使用MSBuild,因为它对我来说太“Visual Studio魔力”了,而且我喜欢尽可能简单的东西。这正是我要找的。