A very common scenario for builds is copying a set of files from one place to another. How can we achieve this with MSBuild? There are several ways we will demonstrate in this chapter. Before we discuss how to copy the files, we’ll first take a close look at the Include statement of an item. I have created some sample files shown in the following tree, which we will use for the remainder of the chapter.
C:\Data\MSBuildExamples\Fundamentals | | ... | +---src | one.txt | two.txt | three.txt | four | +---sub sub_one.txt sub_two.txt sub_three.txt sub_four.txt
Previously, I said that three types of values can be contained in the Include declaration of an item. Those three are:
A single value
Multiple values separated by a "
Declared using wildcards ...