Skip to content

Commit 77d00cb

Browse files
committed
Improve example
1 parent 0a5f98c commit 77d00cb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/msbuild/customize-builds-for-generated-files.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ Files generated during execution don't exist during the evaluation phase, theref
3232

3333
<ItemGroup>
3434
<!-- If your generated file was placed in `obj\` -->
35-
<None Include="$(IntermediateOutputPath)my-generated-file.xyz" CopyToOutputDirectory="PreserveNewest"/>
35+
<None Include="$(IntermediateOutputPath)GeneratedFile.cs" CopyToOutputDirectory="PreserveNewest"/>
3636
<!-- If you know exactly where that file is going to be, you can hard code the path. -->
37-
<None Include="some\specific\path\my-generated-file.xyz" CopyToOutputDirectory="PreserveNewest"/>
37+
<None Include="some\specific\path\my-generatedfile" CopyToOutputDirectory="PreserveNewest"/>
3838

3939
<!-- If you want to capture "all files of a certain type", you can glob like so. -->
4040
<None Include="some\specific\path\*.xyz" CopyToOutputDirectory="PreserveNewest"/>
@@ -51,7 +51,7 @@ Adding your generated file to `None` or `Content` is sufficient for the build pr
5151

5252
## Next steps
5353

54-
This example could be improved to support more realistic use cases. For example, to support incremental builds when the generated code depends on an input file, `Inputs` and `Outputs` should be provided to the target. Such a target would only regenerate the file if the date of the input file or files is more recent than the output file. Often when customizing for code generation, it's recommended to create a custom task. See [Create a custom task for code generation](./tutorial-custom-task-code-generation.md).
54+
This example could be improved to support more realistic use cases. For example, to support [incremental builds](./incremental-builds.md) when the generated code depends on an input file, `Inputs` and `Outputs` should be provided to the target. Such a target would only regenerate the file if the date of the input file or files is more recent than the output file. Often when customizing for code generation, it's recommended to create a custom task. See [Create a custom task for code generation](./tutorial-custom-task-code-generation.md).
5555

5656
## Related content
5757

0 commit comments

Comments
 (0)