0

I have a resource file in the project which need to build/copy to the debug target path for later used.

enter image description here

enter image description here

IDM: Visual Studio 2013

Anyone know how to build/copy the resource file from C++ project to debug target path?

Alen Lee
  • 2,479
  • 2
  • 21
  • 30
  • See the second answer to http://stackoverflow.com/questions/5779703/automatic-copy-files-to-output-during-application-building (first/accepted answer isn't suitable for single files, ignore it). – makhdumi Dec 18 '14 at 17:43
  • @Al-Muhandis, Thank you very much, but I'm prefer to the first one, which add the command line in the Pre-Build or Post-Build Event – Alen Lee Dec 19 '14 at 08:18
  • Using the Pre/Post-build commands is a "dirty" way of doing it from the old VS2008- days. The sole advantage I think is that it's easier for you and co-workers to see, but I am strongly of the the opinion that more developers should be comfortable with reading and modifying MSBuild (csproj, vcxproj) files. Though MS also really needs to improve the GUIs for VC++ projects. – makhdumi Dec 19 '14 at 14:53

1 Answers1

2

I found two way to accomplish this:

Build Events: you can add command line in the Pre-Build Event or Post-Build Event

COPY /y $(ProjectDir)resource.orpo $(TargetDir)resource.orpo

the other one

Alen Lee
  • 2,479
  • 2
  • 21
  • 30