Stu
Stu

Reputation: 2446

Build Azure deployment package in NAnt

I'm looking into migrating our system to Windows Azure. Currently we have an automated process that builds everything and packages it up into msi's for us using Team City and NAnt.

Is there any way to build the packages needed for deployment - I don't need it to deploy, just create the package.

Thanks

Stu

Upvotes: 1

Views: 1010

Answers (3)

Mike Mooney
Mike Mooney

Reputation: 11989

Here's what I use:

<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\"/>

The OurDir part used to publish the package over to a release directory on our server, but as of the Azure 1.5 SDK that seemed to stop working, so now I add this:

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

Upvotes: 0

Richard Astbury
Richard Astbury

Reputation: 2363

Yes, it is straight forward to add some commands to your NANT file to package your application.

See this page for examples and a reference:

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

Upvotes: 1

Jeremy McGee
Jeremy McGee

Reputation: 25210

There is: with MSBuild

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

will create an Azure package using the "Release" configuration and "ReleaseProfile" Azure profile.

Note, if your Azure project is in a solution folder (say "folder") you'll need e.g.

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

Upvotes: 2

Related Questions