Skip to content

Instantly share code, notes, and snippets.

@dellis1972
Last active October 31, 2019 18:00
Show Gist options
  • Save dellis1972/84710bdefedf3d3c48760232071f81a4 to your computer and use it in GitHub Desktop.
Save dellis1972/84710bdefedf3d3c48760232071f81a4 to your computer and use it in GitHub Desktop.
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="_Fixedup" BeforeTargets="IncrementalClean">
<CreateItem Include="$(OutDir)*.pdb;$(OutDir)*.dll">
<Output TaskParameter="Include" ItemName="_FilesNotToDelete" />
</CreateItem>
<CreateItem Include="$([System.IO.Path]::GetFullPath('%(_FilesNotToDelete.Identity)'))"
Condition="Exists('%(_FilesNotToDelete.Identity)')">
<Output TaskParameter="Include" ItemName="_CleanCurrentFileWrites" />
</CreateItem>
</Target>
</Project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment