Skip to content

Instantly share code, notes, and snippets.

@mlehmk
Created June 1, 2015 10:05
Show Gist options
  • Select an option

  • Save mlehmk/38ecdfa5af5a596efb81 to your computer and use it in GitHub Desktop.

Select an option

Save mlehmk/38ecdfa5af5a596efb81 to your computer and use it in GitHub Desktop.
CopyToOutput.targets
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<UseCommonOutputDirectory>true</UseCommonOutputDirectory>
</PropertyGroup>
<Target Name="AfterBuild">
<Copy SourceFiles="@(ReferenceCopyLocalPaths)" DestinationFiles="@(ReferenceCopyLocalPaths->'$(SolutionDir)$(Configuration)\lib\%(DestinationSubDirectory)%(Filename)%(Extension)')" Condition="'%(ReferenceCopyLocalPaths.Extension)' == '.dll' Or '%(ReferenceCopyLocalPaths.Extension)' == '.pdb'"/>
</Target>
<Target Name="AfterClean">
<RemoveDir Directories="$(SolutionDir)$(Configuration)\lib"/>
</Target>
</Project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment