Skip to content

rhysgodfrey/MSBuildAzure

Repository files navigation

MSBuild Copy To Azure Blob Storage Task

Build status

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.

Download

The latest version of the library can be downloaded from the Latest Release Page.

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
DestinationFolder Optional The destination folder to upload the file(s)

Contributors

Thanks to stephenwelsh and swythan for the updates to this project. If you have an enhancement or fix, please fork the project and submit a pull request! Details of past pull requests can be found here

License

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

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

Twitter: @rhysgodfrey

About

MSBuild task to allow copying of files to Azure Blob Storage

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages