Copy exe from one project to another's debug output directory

后端 未结 2 1262
忘掉有多难
忘掉有多难 2021-01-02 07:18

I have two projects, ProjOne.exe and ProjTwo.exe. I want to build ProjOne.exe and it know that it\'s dependant on ProjTwo.exe so that it will copy ProjTwo.exe when it goes

2条回答
  •  無奈伤痛
    2021-01-02 07:49

    Go to Project ProjTwo Properties -> Build Events --> Post-build event command line :

    echo f | xcopy /y "$(TargetPath)" "$(SolutionDir)ProjOne\bin\Debug$(TargetFileName)"
    

    When you build ProjTwo, then it copies ProjTwo.exe to Debug folder of ProjOne

提交回复
热议问题