Repository navigation
Templates: restore the (Unpackaged) profile on packaged apps, fix Reactor devtools profile - #6954
Merged
Alexandre Zollinger Chohfi (azchohfi) merged 2 commits intoNov 6, 2026
Conversation
…ctor devtools profile Packaged scaffolds of all nine app and test templates only got the MsixPackage profile after #6905, so every `dotnet run` printed "A usable launch profile could not be located": dotnet run can only apply Project or Executable profiles. Restore the pre-#6905 (Package) + (Unpackaged) pair, keeping (Package) first as the Visual Studio F5 default. WinApp still launches the app with package identity under dotnet run. Make the Reactor "(Unpackaged, Devtools)" profile pass `--devtools app`; a bare `--devtools` means `--devtools run`, which starts the MCP-server session. Reword the Reactor csproj comment that promised a devtools F5 profile and menu, and update the template tests and README. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
Author
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
Alexandre Zollinger Chohfi (azchohfi)
added a commit
to microsoft/microsoft-ui-reactor
that referenced
this pull request
Nov 6, 2026
The next pack's launch profiles follow microsoft/WindowsAppSDK#6954, the set the user chose: - Packaged scaffolds list (Package) first, Visual Studio's F5 default, then (Unpackaged). - Unpackaged scaffolds keep (Unpackaged) and (Unpackaged, Devtools). The Devtools profile now passes `--devtools app`, so the old caveat against picking it for the dev menu is gone. The reactor-getting-started skill now also says: - `dotnet run` picks (Unpackaged) on a packaged scaffold, because it skips the MSIX profile, and WinApp still launches with package identity. - Under `dotnet run`, a packaged scaffold ignores profile arguments, so devtools come from `dotnet run -- --devtools app`. - Visual Studio users should keep (Package). (Unpackaged) starts a packaged scaffold without identity, and it fails with REGDB_E_CLASSNOTREG. Checked against #6954's diff (all four Reactor templates make the same change) and dotnet/sdk: the default profile is the first one with a supported commandName, and profile commandLineArgs apply only when the command has no arguments. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
12 of 13 tasks
Test-DotnetNewTemplates.ps1 runs with Set-StrictMode -Version 2.0, so reading commandLineArgs from a launch profile that doesn't define it threw "The property 'commandLineArgs' cannot be found on this object" in the Templates-PR smoke test. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
Author
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
Morten Nielsen (dotMorten)
approved these changes
Nov 6, 2026
Alexandre Zollinger Chohfi (azchohfi)
deleted the
azchohfi-fix-template-launch-profiles
branch
November 6, 2026 08:10
4 of 17 tasks
Alexandre Zollinger Chohfi (azchohfi)
added a commit
to microsoft/microsoft-ui-reactor
that referenced
this pull request
Nov 11, 2026
…ce (#1465) * Describe Windows App SDK template pack 0.0.8-alpha in docs and guidance The next Windows App SDK template pack (microsoft/WindowsAppSDK#6845) adds a reactor-singlefile template and a --packaging Packaged|Unpackaged option, and its Reactor scaffolds no longer reference the Microsoft.WindowsAppSDK metapackage (--wasdk-version is gone). Launch profiles now follow the packaging mode. Update the Getting Started and Packaging guides, README, SKILL.md, the agent plugin, and bootstrap.ps1's closing guidance to match, and assert reactor-singlefile in the bootstrap workflow. Bootstrap only names reactor-singlefile when the installed pack provides it, because it keeps an already-installed older pack. Must not merge until the pack is on NuGet.org. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Point the getting-started skill at --devtools app, not the Devtools profile A bare --devtools is parsed as --devtools run (DevtoolsCliParser.ParseSubverbAfter), which starts the devtools logger and MCP server rather than only enabling the in-app dev menu. The Unpackaged scaffold's "(Unpackaged, Devtools)" profile passes exactly that, so the skill now matches #1464: run `dotnet run -- --devtools app` for the dev menu, and don't pick that profile just for it. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Warn instead of failing on reactor-singlefile before pack 0.0.8 The Verify step asserted reactor-singlefile unconditionally, so it failed on every run until template pack 0.0.8-alpha is the newest on NuGet.org: it checked the pack's release date rather than what bootstrap installed. Read the installed pack's version and require the template only from 0.0.8 on; an older pack gets a warning annotation, and an unreadable version fails closed. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Address pr-review findings - bootstrap.ps1: run the closing reactor-singlefile probe under a block-scoped 'Continue'. With no match, `dotnet new list` writes to stderr and exits 103. Windows PowerShell 5.1 turns redirected native stderr into error records, which the script-wide 'Stop' made terminating, so bootstrap died with exit 1 after "Bootstrap complete." on every machine whose pack predates reactor-singlefile. - BootstrapExitCode.Tests.ps1 case 9: run the probe's own statements, lifted from the AST, against dotnet.cmd shims on both legs. The match/no-match pair is a differential check, and on 5.1 the pre-fix line is the positive control. - Agent-facing guidance (root SKILL.md, reactor-getting-started skill, reactor-dev agent): say how to update a pack that predates `--packaging` and reactor-singlefile, matching the getting-started guide. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Address review round 1 A reactor-singlefile scaffold reached the reactor-dev agent's steps 4-5, which assume App.cs and a bare `mur check`. That runs `dotnet build .`, which needs a project file, so it exited 1 with no output even on an untouched scaffold. The agent's steps 4-5 and the reactor-getting-started single-file paragraph now say to keep all code in <Name>.cs and to check it with `mur check <Name>.cs`. Measured on a reactor-singlefile scaffold from the next pack, on SDKs 10.0.403 and 11.0.100-rc.3: - `mur check <Name>.cs` exits 0. - An injected typo gives CS0103 plus a did-you-mean hint, exit 1. - A sibling .cs file is not compiled in (CS0103). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Address review round 2 `dotnet run -- --devtools app` does not light up a dev menu by itself. It only sets ReactorApp.DevtoolsEnabled, which is read only by UseDevtools() and DevtoolsMenu(...), and no Reactor template renders the menu (0 of 4 in the published 0.0.7-alpha, 0 of 5 in the next pack). The reactor-getting-started skill now uses #1464's wording: run with `--devtools app` and render DevtoolsMenu(...), because the flag alone draws nothing. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Describe the launch profiles from microsoft/WindowsAppSDK#6954 The next pack's launch profiles follow microsoft/WindowsAppSDK#6954, the set the user chose: - Packaged scaffolds list (Package) first, Visual Studio's F5 default, then (Unpackaged). - Unpackaged scaffolds keep (Unpackaged) and (Unpackaged, Devtools). The Devtools profile now passes `--devtools app`, so the old caveat against picking it for the dev menu is gone. The reactor-getting-started skill now also says: - `dotnet run` picks (Unpackaged) on a packaged scaffold, because it skips the MSIX profile, and WinApp still launches with package identity. - Under `dotnet run`, a packaged scaffold ignores profile arguments, so devtools come from `dotnet run -- --devtools app`. - Visual Studio users should keep (Package). (Unpackaged) starts a packaged scaffold without identity, and it fails with REGDB_E_CLASSNOTREG. Checked against #6954's diff (all four Reactor templates make the same change) and dotnet/sdk: the default profile is the first one with a supported commandName, and profile commandLineArgs apply only when the command has no arguments. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Verify against the published 0.0.8-alpha template pack Published 0.0.8-alpha (WindowsAppSDK bdc0deb7) also scaffolds AGENTS.md and .vscode/ in every project template, so list them with the other scaffold files in both SKILL.md copies. Bootstrap CI now installs 0.0.8-alpha, so the reactor-singlefile assertion no longer needs its pre-ship version gate. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.
Fixes three problems the
dotnet newtemplates onmainwould ship in 0.0.8-alpha (#6953 bumped the version).1.
dotnet runwarns on every packaged scaffoldSince #6905, packaged scaffolds of all nine app and test templates (
winui,winui-mvvm,winui-navview,winui-tabview,winui-unittest,reactor,reactor-mvu,reactor-navview,reactor-tabview) get only"<name> (Package)"(commandName: MsixPackage). Without--launch-profile,dotnet runapplies the first profile whosecommandNameisProjectorExecutable(dotnet/sdkLaunchSettings.ReadProfileSettingsFromFile). None qualifies, so every run prints the following before launching anyway:This restores the profile pair packaged scaffolds had before #6905.
(Package)stays first, so it remains the Visual Studio F5 default, and(Unpackaged)(Project) follows it.dotnet runnow applies(Unpackaged), andMicrosoft.Windows.SDK.BuildTools.WinAppstill launches the app with package identity. Unpackaged scaffolds are unchanged.Known limitation, to be fixed separately. 0.0.7-alpha and the former VSIX templates had the same issue. For a
Projectprofile, Visual Studio startsTargetPathdirectly and doesn't runComputeRunArguments. Choosing(Unpackaged)on a packaged project in Visual Studio therefore starts the exe without package identity. The app then fails at startup withREGDB_E_CLASSNOTREGfrom the DeploymentManager auto-initializer.2. The Reactor devtools profile passed a bare
--devtoolsReactor reads a bare
--devtoolsas--devtools run, which starts the devtools MCP-server session. The(Unpackaged, Devtools)profile now passes--devtools app. That only setsReactorApp.DevtoolsEnabled, whichDevtoolsMenu(...)andUseDevtools()read. The profile stays on unpackaged scaffolds only:dotnet runignores a profile'scommandLineArgswhen the project setsRunArguments, and WinApp sets them for packaged apps. For packaged apps, usedotnet run -- --devtools app.3. The Reactor csproj comment described a devtools menu that doesn't exist
The comment on the Debug-only ItemGroup said a "devtools F5 profile lights up the devtools menu". No template renders
DevtoolsMenu(...), and packaged scaffolds had no such profile. The comment now says what the ItemGroup does. It referencesMicrosoft.UI.Reactor.Devtoolsand turns onReactor.DevtoolsSupport, which makes devtools available. Launching with--devtools appturns them on, and renderingDevtoolsMenu(...)shows the menu. (The XML comment says "the devtools "app" subcommand" because XML comments can't contain--.)Test-DotnetNewTemplates.ps1now checks that packaged scaffolds listMsixPackagefirst and include aProjectprofile, and that unpackaged Reactor scaffolds pass--devtools app(a bare--devtoolsfails the check). The template README describes the profiles and devtools.Generated launch profiles
<name> (Package):MsixPackage<name> (Unpackaged):Project<name> (Unpackaged):Project<name> (Unpackaged):Project<name> (Unpackaged, Devtools):Project,commandLineArgs: --devtools appValidation
On .NET SDK 10.0.403, with the template pack installed into an isolated
DOTNET_CLI_HOMEand package cache:dotnet run -c Debug -p:Platform=x64on all 18. None printed a launch-profile warning. Packaged apps,winui-unittestincluded, ran with package identity (checked withGetPackageFullName); unpackaged apps ran without it. Onmain, the same command printed the warning for packagedwinuiandreactorscaffolds.(Unpackaged, Devtools): the app's command line ends in--devtools app, and no devtools MCP session starts. A bare--devtoolsprints[devtools] MCP serving on http://127.0.0.1:<port>/mcp.dotnet run -- --devtools appreaches all four packaged Reactor apps.Test-PackagingOptionslocally on x64 for the eight app templates, including the unpackaged publish-and-launch smoke, and all passed. That run didn't use the script'sSet-StrictMode -Version 2.0, so it missed a strict-mode error in the new profile-args check, which the first Templates-PR run caught. The second commit fixes it, andreactorandwinuipass again under strict mode. The updated checks fail onmain's profile sets.binexe directly, as Visual Studio does for aProjectprofile. Bothwinuiandreactorexited with0xE0434352(COMException 0x80040154 REGDB_E_CLASSNOTREGinDeploymentManagerAutoInitializer).