I have two C# projects. One is MainProject(exe) and other is ModuleProject (dll). What I want is that when I build my Moudule project, a copy of its output dll is copied to MainProject output folder. If I am building project in debug then it should go to debug folder.
I guess we can achieve this using build events, but I am not familiarized with them. Can anyone tell me exact command what should I write there, or any other solution.
use this link to learn about the post build:
use $(OutDir)
to get to the output directory or $(TargetFileName)
for the dll name. copy it using the copy command like in command line
it should be something like this:
copy /Y "$(TargetDir)$(ProjectName).dll" "$(SolutionDir)lib\$(ProjectName).dll"
or something like:
copy /Y "$(TargetDir)$(ProjectName).dll" "d:\\MainProject\\bin\\debug\\$(ProjectName).dll"
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.