Skip to content

Instantly share code, notes, and snippets.

@aaronpowell
Created September 25, 2013 04:55
Show Gist options
  • Save aaronpowell/6695293 to your computer and use it in GitHub Desktop.
Save aaronpowell/6695293 to your computer and use it in GitHub Desktop.
Copy Umbraco files on build
<Target Name="BeforeBuild">
<ItemGroup>
<UmbracoFiles Include="..\packages\UmbracoCms.6.1.5\UmbracoFiles\umbraco\**\*;" />
<UmbracoClientFiles Include="..\packages\UmbracoCms.6.1.5\UmbracoFiles\umbraco_client\**\*;" />
</ItemGroup>
<Copy SourceFiles="@(UmbracoFiles)" DestinationFiles="@(UmbracoFiles->'umbraco\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="@(UmbracoClientFiles)" DestinationFiles="@(UmbracoClientFiles->'umbraco_client\%(RecursiveDir)%(Filename)%(Extension)')" />
</Target>
@aaronpowell
Copy link
Author

For when you want to use the UmbracoCms NuGet package but don't want to commit the Umbraco/Umbraco_client folders into your SCM.

This will then copy them before build, with MSBuild taking care of the diff checking.

You'll have to update the /packages/UmbracoCms.<version-number>/ path to match your version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment