views:

189

answers:

1

When doing C# with VS2008, there is a file property "Copy to output directory". This property seems to be missing in VC++. What is the simplest way to approximate the same effect?

I've been told that it should be done with custom build rules. Is this really the simplest way, and if it is, how should the custom build rule be implemented?

+2  A: 

In the project property pages one of the Configuration Properties is a node called Build Events.

Under that node is Pre-Build, Pre-Link, and Post-Build Event nodes.

In each one you can put a simple command in the Command Line property

For example:

copy $(InputDir)\files\my_special_file.txt $(OutDir)

Basically the Command Line is just a cmd.exe command.

John Weldon
Thank you :) I added all my files that should be copied in a "files" subdirectory, and added copy "$(InputDir)\files\*.*" "$(OutDir)" as my post build event.
hrnt