Skip to content

Instantly share code, notes, and snippets.

@starikcetin
Created February 6, 2024 13:30
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 starikcetin/15ec44b4c9c7042e1707904eb0bba1d1 to your computer and use it in GitHub Desktop.
Save starikcetin/15ec44b4c9c7042e1707904eb0bba1d1 to your computer and use it in GitHub Desktop.
Copty C# DLL to somewhere after build

Add this to .csproj:

  <Target Name="CopyDLL" AfterTargets="Build">
    <Message Text="Copying DLL" Importance="High" />
    <Copy
      SourceFiles="$(TargetDir)$(ProjectName).dll"
      DestinationFolder="$(MSBuildProjectDirectory)\relative_target_folder_path_here\"
    />
  </Target>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment