Skip to content

Enhance template example clarity - #11445

Open
Tylor Pater (frogcrush) wants to merge 1 commit into
MicrosoftDocs:mainfrom
frogcrush:patch-2
Open

Tylor Pater (frogcrush) wants to merge 1 commit into
MicrosoftDocs:mainfrom
frogcrush:patch-2

Conversation

@frogcrush

Copy link
Copy Markdown
Contributor

Clarified the example for templates by specifying the default name in the New dialog and the location of the C# class template.

If you don't have the xmlns in there, Visual Studio will show an error when you try to use a custom template.

Additionally, I feel like ReplaceParameters="true" being in there can help add clarity to whether or not parameters are replaced in the template file. This held me up for a bit when creating my own template. Having it as true by default in the example feels like the safer option.

Clarified the example for templates by specifying the default name in the New dialog and the location of the C# class template.
@prmerger-automator

Copy link
Copy Markdown
Contributor

Tylor Pater (@frogcrush) : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change.

@prmerger-automator

Copy link
Copy Markdown
Contributor

Tylor Pater (@frogcrush) : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit d53a316:

✅ Validation status: passed

File Status Preview URL Details
docs/ide/how-to-create-item-templates.md ✅Succeeded

For more details, please refer to the build report.

@v-regandowner

Copy link
Copy Markdown
Contributor

RoseHJM

Can you review the proposed changes?

IMPORTANT: When the changes are ready for publication, adding a #sign-off comment is the best way to signal that the PR is ready for the review team to merge.

#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Clarify the distinction between the Add New Item dialog, item name, and source filename.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Clarifies the Visual Studio item-template XML example.

Changes:

  • Adds the required XML namespace.
  • Clarifies template and source-file naming.
  • Enables ReplaceParameters.
File summaries
File Reviewed changes
docs/ide/how-to-create-item-templates.md Updates the item-template example and explanation; naming terminology still needs clarification.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

1. Add a [ProjectSubType](../extensibility/projectsubtype-element-visual-studio-templates.md) element immediately after the `ProjectType` element, with value `Windows`, `Office`, `Database`, or `Web`. For example: `<ProjectSubType>Database</ProjectSubType>`.

The following example shows a *.vstemplate* file for `Office` projects.
The following example shows a *.vstemplate* file for `Office` projects, where `Class.cs` is the default name in the New dialog and `Class1.cs` is the name of the C# class template located alongside the *.vstemplate* file.
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.

4 participants