Say you have a Visual Studio solution containing 2 projects:
Project B depends upon the output .exe
of Project A. Is there a way to set this .exe
to be automatically copied to Project B's output folder during build?
You can use Buildevents in the properties for the project.
Here you can define Post and Prebuild Tasks with Wildcards.
like:
copy "$(TargetPath)" "$(SolutionDir)UploaderClient\bin\Debug\Plugins\$(TargetFileName)"
Yes, in VS go into the project properties for A. Look under "Configuration Properties" for a sub item of "Build Events", expand that and add a "Post-Build Event". These are simple dos commands, so you can just copy the .exe where-ever you want.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.