Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup the the Copy tasks from duality csproj files #793

Open
Barsonax opened this issue Apr 21, 2020 · 0 comments
Open

Cleanup the the Copy tasks from duality csproj files #793

Barsonax opened this issue Apr 21, 2020 · 0 comments
Assignees
Labels
DevTool Area: Development tools and environment

Comments

@Barsonax
Copy link
Member

Barsonax commented Apr 21, 2020

Summary

Currently in some place we are using a copy task to copy files to the Output folder:

  <Target Name="AggregateOutput" BeforeTargets="AfterBuild">
    <Copy SourceFiles="$(OutputPath)$(AssemblyName).exe" DestinationFolder="$(SolutionDir)Build\Output\" />
    <Copy SourceFiles="$(OutputPath)$(AssemblyName).exe.config" DestinationFolder="$(SolutionDir)Build\Output\" />
    <Copy SourceFiles="$(OutputPath)$(AssemblyName).pdb" DestinationFolder="$(SolutionDir)Build\Output\" />
    <Copy SourceFiles="$(OutputPath)$(AssemblyName).xml" DestinationFolder="$(SolutionDir)Build\Output\" />
    <Copy SourceFiles="$(PkgAdamsLair_WinForms)\lib\net45\AdamsLair.WinForms.dll" DestinationFolder="$(SolutionDir)Build\Output\" />
    <Copy SourceFiles="$(PkgAdamsLair_WinForms)\lib\net45\AdamsLair.WinForms.xml" DestinationFolder="$(SolutionDir)Build\Output\" />
    <Copy SourceFiles="$(OutputPath)Aga.Controls.dll" DestinationFolder="$(SolutionDir)Build\Output\" />
    <Copy SourceFiles="$(OutputPath)PopupControl.dll" DestinationFolder="$(SolutionDir)Build\Output\" />
    <Copy SourceFiles="$(OutputPath)WeifenLuo.WinFormsUI.Docking.dll" DestinationFolder="$(SolutionDir)Build\Output\" />
    <Copy SourceFiles="$(OutputPath)VistaBridgeLibrary.dll" DestinationFolder="$(SolutionDir)Build\Output\" />
    <Copy SourceFiles="$(OutputPath)VistaBridgeLibrary.xml" DestinationFolder="$(SolutionDir)Build\Output\" />
    <Copy SourceFiles="$(OutputPath)Windows7.DesktopIntegration.dll" DestinationFolder="$(SolutionDir)Build\Output\" />
    <Copy SourceFiles="$(OutputPath)Windows7.DesktopIntegration.xml" DestinationFolder="$(SolutionDir)Build\Output\" />
  </Target>

This sort of works but is not a very clean way to do things and sometimes causes weird issues with files not being found.

Analysis

  • The resolved framework is hardcoded in the copy task, thus whenever this changes it breaks with a not so clear error message that it cannot find the file.
  • Alot of duplicate code
  • We can probably achieve the same result by changing the $(OutputPath) variable
  • Weird errors sometimes
@Barsonax Barsonax added the DevTool Area: Development tools and environment label Apr 21, 2020
@Barsonax Barsonax self-assigned this Apr 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DevTool Area: Development tools and environment
Development

No branches or pull requests

1 participant