Skip to main content

Files element

Authoring to define the set of files to be harvested for inclusion in a package.


Package, Module, Fragment, ComponentGroup, Directory, DirectoryRef, StandardDirectory, Feature, FeatureGroup, FeatureRef



Directory (String) : This attribute specifies a reference to a Directory element with matching Id attribute containing a directory path for the root of the harvested files.

Include (String, required) : A file-selection pattern that can include directory names, file names, and wildcards. If a pattern is not an absolute path (via a preprocessor variable, unnamed bind path, or named bind path), it is interpreted as relative to the directory containing the source file. Absolute paths via a named bind path are recommended.

Wildcards include typical *.ext globs and MSBuild-style ** globs to indicate that directories should be recursed. Examples include:

!(bindpath.ToBeHarvested)\**All files in the parent directory identified by the ToBeHarvested bind path and its subdirectories.
$(PayloadFiles)\bin\Release\**All files in the bin\Release subdirectory in the directory named by the PayloadFiles preprocessor variable and its subdirectories.
!(bindpath.arm64)\**.pdbAll files with .pdb extension in the parent directory identified by the arm64 bind path and its subdirectories.
**If an unnamed bind path was specified, all files in that directory and its subdirectories. If an unnamed bind path was not specified, all files in directory of the source .wxs file and its subdirectories.

Subdirectory (String) : This attribute defines one or more directories below the directory referenced by the Directory attribute. This attribute is optional but can only be specified when the Directory attribute is also specified.

Edit the schema for this page