Skip to content

Instantly share code, notes, and snippets.

@leekelleher
Last active December 16, 2015 00:39
Show Gist options
  • Save leekelleher/5349732 to your computer and use it in GitHub Desktop.
Save leekelleher/5349732 to your computer and use it in GitHub Desktop.
Fetches associated MSBuild Tasks packages (via NuGet), then copies the assemblies and targets to a /tools directory. To be used with https://github.com/leekelleher/umbraco-package-boilerplate
IF NOT EXIST tools\MSBuildTasks\NUL (GOTO FETCH) ELSE GOTO EXIST
:EXIST
ECHO MSBuildTasks already exist
:FETCH
ECHO Fetching MSBuildTasks via NuGet
:: Set the working directory
CD tools
:: Fetch NuGet packages
nuget install MSBuildTasks -x -o _temp
nuget install MSBuild.Umbraco.Tasks -x -o _temp
:: Copy to target directory
XCOPY _temp\MSBuildTasks\tools\MSBuild.Community.Tasks.* MSBuildTasks /i /y /q
XCOPY _temp\MSBuild.Umbraco.Tasks\lib\MSBuild.Umbraco.Tasks.* MSBuildTasks /i /y /q
XCOPY _temp\SharpZipLib\lib\20\ICSharpCode.SharpZipLib.dll MSBuildTasks /i /y /q
:: Tidy up
RMDIR _temp /s /q
CD ..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment