Add ContentDialog item template to the VSIX#6607
Open
lauren-ciha wants to merge 1 commit into
Open
Conversation
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request adds the WinUI 3 ContentDialog item template to the Visual Studio VSIX templates, aligning the VSIX and dotnet new item template sources by using VS-compatible $parameter$ replacements and adding the necessary VSIX string resources.
Changes:
- Add new VSIX string resources for the ContentDialog item template (including an experimental name variant).
- Update the ContentDialog
.vstemplateto reference the new string IDs. - Update the shared ContentDialog item template source (
.xaml/.xaml.cs) to use$rootnamespace$/$safeitemname$and concrete WinUI types so it works for both VSIX anddotnet new. - Adjust experimental VSIX DisplayName generation to avoid exceeding the manifest’s 50-character limit.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| dev/Templates/VSIX/Extension/Directory.Build.targets | Updates experimental VSIX DisplayName generation logic (length constraint handling). |
| dev/Templates/VSIX/Extension/Cs/Common/VSPackage.resx | Adds new string resources (name/experimental name/description) for the ContentDialog template. |
| dev/Templates/Source/ItemTemplates/Neutral/CSharp/ContentDialog/WinUI.Neutral.Cs.ContentDialog.vstemplate | Switches Name/Description IDs to the newly added string resources. |
| dev/Templates/Source/ItemTemplates/Neutral/CSharp/ContentDialog/ContentDialog.xaml.cs | Replaces dotnet-template-only tokens with VSIX-compatible parameters and concrete WinUI types. |
| dev/Templates/Source/ItemTemplates/Neutral/CSharp/ContentDialog/ContentDialog.xaml | Replaces dotnet-template-only tokens with VSIX-compatible parameters and concrete WinUI markup. |
| the trailing deployment parenthetical (e.g. " (LocalDev)") - the | ||
| deployment is already encoded in the .Experimental Identity/suffix. | ||
| --> | ||
| <ExperimentalVsixDisplayName>Experimental $([System.Text.RegularExpressions.Regex]::Replace('$(_OriginalVsixName)', ' \(.*\)', ''))</ExperimentalVsixDisplayName> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #3723 and #5941
The ContentDialog item template was present since #6407 for the dotnet templates. To add them to the VSIX templates, they needed unique strings and
$parameter$syntax instead of__WINUI_CONTENT_DIALOG__, the latter of which only works with the dotnet template engine. The$parameter$syntax works in both.Validation:
.\dev\Templates\Dotnet\Test-DotnetNewTemplates.ps1 -WindowsAppSDkVersion "2.2.0" -dotnetsdkversion "*"A microsoft employee must use /azp run to validate using the pipelines below.
WARNING:
Comments made by azure-pipelines bot maybe inaccurate.
Please see pipeline link to verify that the build is being ran.
For status checks on the main branch, please use TransportPackage-Foundation-PR
(https://microsoft.visualstudio.com/ProjectReunion/_build?definitionId=81063&_a=summary)
and run the build against your PR branch with the default parameters.