Skip to content

Instantly share code, notes, and snippets.

@andreyka26-git
Last active March 11, 2024 20:08
Show Gist options
  • Save andreyka26-git/c895d7f584bfd2712c5fe756ba466138 to your computer and use it in GitHub Desktop.
Save andreyka26-git/c895d7f584bfd2712c5fe756ba466138 to your computer and use it in GitHub Desktop.
.csproj set target path of copied file
<!--
To know <sourcepath> you might just select proprties of the file in Visual Studio and select "Copy To Output Directory = Copy if Newer"
It will add record to csproj with <sourcepath> included.
<targetpath> is the path from the build directory <projectsrc>/bin/x64/Debug/*
-->
<ContentWithTargetPath Include="sourcepath">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<TargetPath>targetpath</TargetPath>
</ContentWithTargetPath>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment