Skip to content

Instantly share code, notes, and snippets.

@eriksimonic
Last active September 22, 2016 12:55
Show Gist options
  • Save eriksimonic/b979fc4239730368ddf59b9bc595190e to your computer and use it in GitHub Desktop.
Save eriksimonic/b979fc4239730368ddf59b9bc595190e to your computer and use it in GitHub Desktop.
Include adition folder in publish process, for all Build processes

#Include folder on publish#

the folder is not included in the main project Source for this snipset is Umbraco Deplyment .target file.

<!-- Add new target -->
<Target BeforeTargets="AfterBuild" Name="CopyMedia">
<ItemGroup>
<CustomFilesToInclude Include=".\media\**\*">
<Dir>media</Dir>
</CustomFilesToInclude>
<FilesForPackagingFromProject Include="@(CustomFilesToInclude)">
<DestinationRelativePath>%(CustomFilesToInclude.Dir)\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
</ItemGroup>
</Target>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment