MSBuild task to allow copying of files to Azure Blob Storage
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 15 commits ahead, 7 commits behind rhysgodfrey:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.nuget
Properties
.gitattributes
.gitignore
CopyToAzureBlobStorageTask.cs
LICENSE.txt
README.md
RhysG.MSBuild.Azure.csproj
RhysG.MSBuild.Azure.nuspec
RhysG.MSBuild.Azure.sln
app.config
packages.config

README.md

MSBuild Copy To Azure Blob Storage Task

Introduction

A MSBuild task to allow copying of files to Azure Blob Storage. To save unnecessary copying files are only copied if the source files last write time is different to the one tagged against the blob in Azure.

Usage

Include the DLL in your MSBuild project

<UsingTask TaskName="CopyToAzureBlobStorageTask" AssemblyFile="..\PATH-TO-DLL\RhysG.MSBuild.Azure.dll"/>

Create an item group referencing the files you want to copy to Azure Blob storage. For example to copy all the javascript files from the scripts directory:

<ItemGroup>
	<Scripts Include="..\PATH-TO-FILES\scripts\*.js" />
</ItemGroup>

Then call the CopyToAzureBlobStorageTask this takes several parameters described below. To copy the files selected above to a container named scripts:

<CopyToAzureBlobStorageTask ContainerName="scripts" ContentType="text/javascript" ConnectionString="YOUR-AZURE-CONNECTION-STRING" Files="@(Scripts)" />

Parameters

Parameter Description
ContainerName The name of the Azure Blob container to copy the files to. If this does not exist it will be created
ConnectionString The Azure connection string to use
Files The files to copy
ContentType Optional The content type for Azure to serve the files as
ContainerPermission Optional The permission for the BlobContainer. Can be Off/Container/Blob. Defaults to Off.

License

This library is released under the FreeBSD License, see LICENSE.txt for more information.

Blog: http://www.rhysgodfrey.co.uk Twitter: @rhysgodfrey