Alex Rivera | Logout

Using MSBuild and CSPack task to package Azure roles

Asked 2011-01-19T04:14:35.797
9

I am working on a build script for an Azure web role project. The script will run on a build server, so using VS is a non-starter.

I can build the project using MSBuild and use CmdLets for Azure to handle the deployment (via PowerShell). The part that is missing is the creation of the cloud package. I can use the CSPack.exe tool that is included in the SDK, but I would like to use MSBuild tasks if possible, as that way I can leverage the build configuration options and integrate the creation of the package with the rest of the process.

I've dug around in the Azure web deployment project, but I can't find any references to the CSPack task. There might be some VS magic happening here, unless I am missing the file that references the CSPack/Azure tasks. The assembly that I am looking at is Microsoft.ServiceHosting.Tools.MSBuildTasks.dll - reflector tells me that the CSPack Task is in there.

Has anyone successfully used the CSPack MSBuild task? If so, any pointers as to how to use it would be very helpful!

If I am barking up the completely wrong tree, please let me know!

Thanks, Erick

Edit
Report

1 Answer

1

I am just using

<Exec Command="$(PackageCommand)" WorkingDirectory="$(BuildProjectFolderPath)\..\main\source\" />

where PackageCommand is what you use in the command line to call cspack.exe.

answered 2011-01-19T18:52:59.237

Your Answer