"Copy to output directory" in VC++
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 bu开发者_如何学编程ild rules. Is this really the simplest way, and if it is, how should the custom build rule be implemented?
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.
精彩评论