Skip to content

Add packaging options to .NET WinUI and Reactor templates - #6905

Merged
Morten Nielsen (dotMorten) merged 4 commits into
mainfrom
user/dotmorten/unpackaged_templates
Oct 30, 2026
Merged

Morten Nielsen (dotMorten) merged 4 commits into
mainfrom
user/dotmorten/unpackaged_templates

Conversation

@dotMorten

@dotMorten Morten Nielsen (dotMorten) commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #2214: Adds a Packaging choice to the WinUI and Reactor project templates.

  • Default to Packaged, with Unpackaged as an alternative.
  • Place Packaging and both publisher fields last, and disable publisher fields for unpackaged apps.
  • Omit the MSIX manifest, MSIX-only assets/tooling, and WinApp package for unpackaged projects while retaining application and title-bar icons.
  • Generate matching launch profiles and retain Reactor devtools profiles for unpackaged apps.
  • Add packaging scaffold checks and document the new option.

Validation

  • Previously validated default, packaged, and unpackaged scaffolds and representative unpackaged builds, including icon output.
  • Full x64 template suite after merging latest main: pending.
  • Persistent packaging checks validate generated content; the existing app build loop still uses WindowsPackageType=None.

Notes

Unit Tests skipped here, since that is handled in #6885

Required pipeline validation

A Microsoft employee must validate this PR using TransportPackage-Foundation-PR with the PR branch and default parameters:
https://microsoft.visualstudio.com/ProjectReunion/_build?definitionId=81063&_a=summary

- Add Packaged/Unpackaged selection, defaulting to Packaged.
- Place Packaging and publisher fields last; disable publishers when unpackaged.
- Exclude MSIX-only assets and settings when unpackaged.
- Generate matching launch profiles and omit WinApp package reference from unpackaged projects.
- Add scaffold checks for default, packaged, and unpackaged variants.
@azure-pipelines

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

@dotMorten

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).

@dotMorten

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).

@dotMorten

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).

@lauren-ciha

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).

@dotMorten
Morten Nielsen (dotMorten) merged commit 32dbd99 into main Oct 30, 2026
56 checks passed
@dotMorten
Morten Nielsen (dotMorten) deleted the user/dotmorten/unpackaged_templates branch October 30, 2026 22:57
Alexandre Zollinger Chohfi (azchohfi) added a commit that referenced this pull request Nov 5, 2026
…lates

Resolve conflicts with #6874 (templates moved under Dotnet/templates) and
#6905 (Packaged/Unpackaged option, host-conditional package references):

- ProjectTemplate.csproj: take main's layout, minus the HostIdentifier-gated
  Microsoft.WindowsAppSDK reference.
- ide.host.json: take main's Packaging/publisher entries, minus the hidden
  windowsAppSdkVersion entry.
- template.json: drop the new post-action that ran
  `dotnet add package Microsoft.WindowsAppSDK`, which would otherwise re-add
  the metapackage after scaffolding.
- Test-DotnetNewTemplates.ps1: Test-PackagingOptions no longer passes
  --wasdk-version to reactor* templates, which no longer define it.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Alexandre Zollinger Chohfi (azchohfi) added a commit that referenced this pull request Nov 6, 2026
…ctor devtools profile (#6954)

* Templates: restore the (Unpackaged) profile on packaged apps, fix Reactor 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>

* Template tests: read optional commandLineArgs safely under strict mode

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>

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.

Need unpackaged app template

3 participants