简体   繁体   中英

Visual Studio post build events

I am currently working on a plugin system. I have a solution that contains, at the moment, two projects: the main program and a test plugin. The plugin is compiled into a DLL. I would like to copy the DLL into the main program's plugins folder.

My question is: is there a way so that I can have the dll automatically copied to the main program's plugins folder by referencing it (rather than using a path)? Also, it is possible to copy to the release/debug version as appropriate (debug version plugin should go to the debug version of the main program)?

xcopy "$(Dir1)Project1\bin\dll1.dll" "$(Dir2)Project2\Bin\"

For reference you can use below link: Copy file(s) from one project to another using post build event...VS2010

For Debug/Release use code below

if $(ConfigurationName) == Debug/Release

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM