Skip to content

Commit 81e2690

Browse files
Add examples for how to add files to the build
1 parent 0e80dc8 commit 81e2690

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

docs/msbuild/customize-your-build.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,14 @@ Files generated during execution don't exist during the evaluation phase, theref
203203
<!-- Generated files should be placed in $(IntermediateOutputPath) -->
204204

205205
<ItemGroup>
206+
<!-- If your generated file was placed in `obj\` -->
206207
<None Include="$(IntermediateOutputPath)my-generated-file.xyz" CopyToOutputDirectory="PreserveNewest"/>
208+
<!-- If you know exactly where that file is going to be, you can hard code the path. -->
209+
<None Include="some\specific\path\my-generated-file.xyz" CopyToOutputDirectory="PreserveNewest"/>
210+
211+
<!-- If you want to capture "all files of a certain type", you can glob like so. -->
212+
<None Include="some\specific\path\*.xyz" CopyToOutputDirectory="PreserveNewest"/>
213+
<None Include="some\specific\path\*.*" CopyToOutputDirectory="PreserveNewest"/>
207214
</ItemGroup>
208215
</Target>
209216
```

0 commit comments

Comments
 (0)