Skip to content

Instantly share code, notes, and snippets.

@ignaciojonas
Created June 12, 2013 23:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ignaciojonas/5770067 to your computer and use it in GitHub Desktop.
Save ignaciojonas/5770067 to your computer and use it in GitHub Desktop.
Target to publish to the file system in C# projects using VS2010
<Target Name="PublishToFileSystem" DependsOnTargets="PipelinePreDeployCopyAllFilesToOneFolder">
<Error Condition="'$(PublishDestination)'==''" Text="The PublishDestination property must be set to the intended publishing destination." />
<MakeDir Condition="!Exists($(PublishDestination))" Directories="$(PublishDestination)" />
<ItemGroup>
<PublishFiles Include="$(_PackageTempDir)\**\*.*" />
</ItemGroup>
<Copy SourceFiles="@(PublishFiles)" DestinationFiles="@(PublishFiles->'$(PublishDestination)\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="True" />
</Target>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment