Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 29, 2025

This PR adds comprehensive documentation for three .NET SDK item templates that were missing from the official documentation:

buildprops template

  • Creates a Directory.Build.props file for customizing MSBuild properties across an entire folder tree
  • Documents the --inherit option for importing parent Directory.Build.props files
  • Documents the --use-artifacts option for enabling artifacts output layout with reference to artifacts documentation
  • Added in .NET SDK 8.0.100

buildtargets template

  • Creates a Directory.Build.targets file for customizing MSBuild targets and tasks across an entire folder tree
  • Documents the --inherit option for importing parent Directory.Build.targets files
  • Added in .NET SDK 8.0.100

sln template

  • Creates an empty solution file containing no projects
  • Documents the --format option available in .NET SDK 9.0.200+ for choosing between sln and slnx formats
  • Notes that .NET 10 will default to slnx format

Documentation Updates

  • Added the new templates to the templates table of contents in includes/templates.md with proper cross-references
  • Enhanced the --use-artifacts option description with a link to the artifacts output layout documentation
  • All sections follow existing documentation patterns with clear descriptions and detailed option explanations

All template options have been tested and verified for accuracy using the actual .NET SDK commands.

Fixes #48190.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.


Internal previews

📄 File 🔗 Preview link
docs/core/tools/dotnet-new-sdk-templates.md Default templates for dotnet new

@Copilot Copilot AI changed the title [WIP] Add missing documentation for sln, buildprops, and buildtargets item templates Add missing documentation for sln, buildprops, and buildtargets item templates Aug 29, 2025
@Copilot Copilot AI requested a review from baronfel August 29, 2025 19:31
Copilot finished work on behalf of baronfel August 29, 2025 19:31
Copy link
Member

@baronfel baronfel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot the new templates need to be added to or linked from the existing includes/templates.md table of contents

Copy link
Contributor Author

Copilot AI commented Aug 29, 2025

@copilot the new templates need to be added to or linked from the existing includes/templates.md table of contents

Added the buildprops and buildtargets templates to the templates.md table of contents with proper links to their documentation sections. The sln template was already listed but now has the correct link. Changes committed in 4891e45.

Copilot finished work on behalf of baronfel August 29, 2025 19:39
@Copilot Copilot AI requested a review from baronfel August 29, 2025 19:39
@baronfel baronfel marked this pull request as ready for review August 29, 2025 19:45
@baronfel baronfel requested review from adegeo and a team as code owners August 29, 2025 19:45
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the templates in the table be listed alphabetically to make it easier to find what you're looking for?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that idea!

@@ -21,6 +21,30 @@ Each template may have additional options available. To show the additional opti
In case the template supports multiple languages, this command will show help for the template in the default language. By combining it with the `--language` option, you can see the help for other languages: `dotnet new console --help --language F#`.
The templates that ship with the .NET SDK have the following additional options:

## `buildprops`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since all of these sections are really about the options for each template, I feel like each template heading should be an H3, not an H2, to make them subheadings of ## Template options.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would mean that there is a single H2 in the entire article and that the TOC on the right-side is useless. Considering each section here is a template itself, I think it makes sense to keep them as H2.

Co-authored-by: Genevieve Warren <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add missing documentation for sln, buildprops, and buildtargets item templates
4 participants