Skip to content

Fix "Cancel" button in the C# and C++ wapproj templates so that it returns to the "Configure your new project" menu instead of creating a broken project - #6708

Open
Lauren Ciha (lauren-ciha) wants to merge 12 commits into
mainfrom
user/laurenciha/fix-wapproj-cancel-button
Open

Fix "Cancel" button in the C# and C++ wapproj templates so that it returns to the "Configure your new project" menu instead of creating a broken project#6708
Lauren Ciha (lauren-ciha) wants to merge 12 commits into
mainfrom
user/laurenciha/fix-wapproj-cancel-button

Conversation

@lauren-ciha

Copy link
Copy Markdown
Member

In the WinUI Blank App (Packaged with Windows Application Packaging Project) templates for C# and C++, a dialog appears asking users to confirm target and minimum platform versions they want their app to support:
image

Before this change, when a user clicked "Cancel", the template would generate the BlankApp project, but not the packaging (wapproj) project. This was because the wizard that launched this dialog only existed in the packaging project and not the parent project (an invisible project that configures the entire template). By moving the dialog into the parent project, both projects exit when "Cancel" is clicked, returning users to the "Configure your new project menu" to edit their app settings further.

Locally validated the fix and confirmed there were no regression by manually testing with the local builds (dev\Templates\VSIX\build-local-VSIX-package\build-install-localdev-vsix.ps1).


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.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@lauren-ciha

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.

@lauren-ciha

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.

@lauren-ciha
Lauren Ciha (lauren-ciha) force-pushed the user/laurenciha/fix-wapproj-cancel-button branch from 464eb00 to f7ea7df Compare August 26, 2026 17:44

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.

Pull request overview

Moves platform-version dialogs to packaged-app parent templates so cancellation aborts the entire project group.

Changes:

  • Propagates parent wizard parameters into C# and C++ child projects.
  • Adds MSBuild-version selection and VSIX validation.
  • Adds local Windows App SDK version resolution.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
Build-VSIX-Local.ps1 Adds MSBuild selection and VSIX checks.
build-install-localdev-vsix.ps1 Forwards the MSBuild version.
WinUI.Desktop.Cs.PackagedApp.vstemplate Moves the platform wizard to the parent.
WinUI.Desktop.Cs.WapProj.vstemplate Removes the child platform wizard.
C# WapProjTemplate.wapproj Uses propagated platform parameters.
C# BlankApp/ProjectTemplate.csproj Uses propagated package versions.
WinUI.Desktop.CppWinRT.PackagedApp.vstemplate Moves platform and publisher wizards.
WinUI.Desktop.CppWinRT.WapProj.vstemplate Removes moved child wizards.
C++ WapProjTemplate.wapproj Uses propagated platform parameters.
C++ Package-managed.appxmanifest Uses the propagated publisher.
Test-DotnetNewTemplates.ps1 Adds local package-version lookup.

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

Comment thread dev/Templates/VSIX/build-local-VSIX-package/Build-VSIX-Local.ps1
Comment thread dev/Templates/VSIX/build-local-VSIX-package/Build-VSIX-Local.ps1 Outdated
Comment thread dev/Templates/VSIX/build-local-VSIX-package/Build-VSIX-Local.ps1
Comment thread dev/Templates/Dotnet/Test-DotnetNewTemplates.ps1 Outdated
Comment thread dev/Templates/Dotnet/Test-DotnetNewTemplates.ps1 Outdated
@lauren-ciha

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.

@lauren-ciha

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.

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.

2 participants