将exe从一个项目复制到另一个项目的调试输出目录 [英] Copy exe from one project to another's debug output directory

查看:80
本文介绍了将exe从一个项目复制到另一个项目的调试输出目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个项目ProjOne.exe和ProjTwo.exe.我想构建ProjOne.exe,它知道它依赖于ProjTwo.exe,因此在构建ProjOne.exe时它将复制ProjTwo.exe.

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 to build ProjOne.exe.

我也有一个ProjThree.dll,它已经完美地做到了.但这仅是因为dll被ProjOne引用了.

I also have a ProjThree.dll that it already does that for perfectly. But this in only because the dll is referenced by ProjOne.

有什么方法可以像处理DLL/OCX一样吗?还是这将是一些POST构建脚本? :)如果是这样,请举例说明我将使用的脚本.

Any way to do this like it does with DLLs/OCXs? Or is this going to be some POST build scripting? :) If so please give examples of the script I would use.

谢谢!

推荐答案

转到 Project ProjTwo属性-> 构建事件-> 构建后事件命令行:

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

构建ProjTwo时,它将ProjTwo.exe复制到ProjOne的Debug文件夹中

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

这篇关于将exe从一个项目复制到另一个项目的调试输出目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆