Skip to content

Instantly share code, notes, and snippets.

@chaliy
Created September 1, 2010 07:03
Show Gist options
  • Select an option

  • Save chaliy/560341 to your computer and use it in GitHub Desktop.

Select an option

Save chaliy/560341 to your computer and use it in GitHub Desktop.
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
ToolsVersion="4.0" >
<ItemGroup>
<DeployFiles Include="..\Output\**\*.*" />
</ItemGroup>
<Target Name="Deploy" DependsOnTargets="_Clean">
<!-- For now Output folder does not even existis -->
<!-- MSBuild will build all stuff an put to Output folder -->
<MSBuild Projects="@(ProjectFiles)" Targets="Build" Properties="TrackFileAccess=False;PublishRootPath=..\..\Output;"/>
<!-- Now lets do something with DeployFiles files -->
<!-- In MSBUILD 3.5 it will be empty -->
<!-- In 4.0 it will behave as expected -->
<Copy SourceFiles="@(DeployFiles)" DestinationFiles="@(DeployFiles->'$(DeployPath)\%(RecursiveDir)%(Filename)%(Extension)')" />
</Target>
</Project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment