Skip to content

Use MVVM Toolkit partial properties in templates - #36074

Merged
jfversluis merged 1 commit into
mainfrom
jfversluis-update-mvvm-toolkit-partial-properties
Jul 2, 2026
Merged

jfversluis merged 1 commit into
mainfrom
jfversluis-update-mvvm-toolkit-partial-properties

Conversation

@jfversluis

Copy link
Copy Markdown
Member

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Summary

  • Updates the sample-content MAUI template to use CommunityToolkit.Mvvm 8.4.2.
  • Converts template page models from field-backed [ObservableProperty] members to partial observable properties without enabling preview language features.
  • Switches the sample-content SQLitePCLRaw dependency from bundle_green to bundle_e_sqlite3 3.0.3 and updates cgmanifest version mapping so generated projects avoid default NuGet audit warnings.

Validation

  • dotnet build .\src\Templates\src\Microsoft.Maui.Templates.csproj -p:UpdateCgManifestBeforeBuild=false -p:GenerateCgManifest=false
  • Packed templates and generated a dotnet new maui --sample-content true app from an isolated template hive.
  • dotnet build <generated app> -f net10.0-windows10.0.19041.0 -p:RestoreIgnoreFailedSources=true completed with 0 warnings and 0 errors, with no generated LangVersion or EnablePreviewFeatures entries.

Update the sample-content MAUI template to use CommunityToolkit.Mvvm 8.4.2 partial observable properties without enabling preview language features.

Also switch the SQLitePCLRaw template dependency to bundle_e_sqlite3 3.0.3 so generated sample-content projects build without NuGet audit warnings.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 36074

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 36074"

@kubaflo

kubaflo commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

🔍 AI-generated comment — posted by GitHub Copilot CLI on behalf of @kubaflo.

Mac build validation

The PR description validates on Windows (net10.0-windows). I ran the equivalent validation on macOS to cover the Mac-hosted targets.

What I did: packed the template from this branch → installed into an isolated template hive → generated a dotnet new maui --sample-content true app → built it (host SDK 10.0.100, maui workload).

Mac-hosted target Result
net10.0-maccatalyst ● Build succeeded — 0 warnings / 0 errors (.app bundle produced)
net10.0-ios ● Build succeeded — 0 warnings / 0 errors

Confirmed on Mac:

  • ● Partial [ObservableProperty] properties compile under the default net10 LangVersion — no errors.
  • ● The generated .csproj contains no LangVersion / EnablePreviewFeatures entries — i.e. preview language features are not leaked into user projects (the goal of this PR).
  • ● CommunityToolkit.Mvvm 8.4.2 + SQLitePCLRaw.bundle_e_sqlite3 3.0.3 restore and build cleanly.
  • ● 0 warnings overall → no NuGet audit warnings from the SQLite bundle swap.

Builds cleanly on macOS from a template-generation perspective. ℹ Note: I only exercised the build (no on-device run), and did not test net10.0-android.

@jfversluis
jfversluis merged commit 39af915 into main Jul 2, 2026
36 checks passed
@jfversluis
jfversluis deleted the jfversluis-update-mvvm-toolkit-partial-properties branch July 2, 2026 08:54
@github-actions github-actions Bot added this to the .NET 10 SR9 milestone Jul 2, 2026
devanathan-vaithiyanathan pushed a commit to devanathan-vaithiyanathan/maui that referenced this pull request Jul 7, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

- Updates the sample-content MAUI template to use
`CommunityToolkit.Mvvm` 8.4.2.
- Converts template page models from field-backed `[ObservableProperty]`
members to partial observable properties without enabling preview
language features.
- Switches the sample-content SQLitePCLRaw dependency from
`bundle_green` to `bundle_e_sqlite3` 3.0.3 and updates cgmanifest
version mapping so generated projects avoid default NuGet audit
warnings.

- `dotnet build .\src\Templates\src\Microsoft.Maui.Templates.csproj
-p:UpdateCgManifestBeforeBuild=false -p:GenerateCgManifest=false`
- Packed templates and generated a `dotnet new maui --sample-content
true` app from an isolated template hive.
- `dotnet build <generated app> -f net10.0-windows10.0.19041.0
-p:RestoreIgnoreFailedSources=true` completed with 0 warnings and 0
errors, with no generated `LangVersion` or `EnablePreviewFeatures`
entries.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
devanathan-vaithiyanathan pushed a commit to devanathan-vaithiyanathan/maui that referenced this pull request Jul 7, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

- Updates the sample-content MAUI template to use
`CommunityToolkit.Mvvm` 8.4.2.
- Converts template page models from field-backed `[ObservableProperty]`
members to partial observable properties without enabling preview
language features.
- Switches the sample-content SQLitePCLRaw dependency from
`bundle_green` to `bundle_e_sqlite3` 3.0.3 and updates cgmanifest
version mapping so generated projects avoid default NuGet audit
warnings.

- `dotnet build .\src\Templates\src\Microsoft.Maui.Templates.csproj
-p:UpdateCgManifestBeforeBuild=false -p:GenerateCgManifest=false`
- Packed templates and generated a `dotnet new maui --sample-content
true` app from an isolated template hive.
- `dotnet build <generated app> -f net10.0-windows10.0.19041.0
-p:RestoreIgnoreFailedSources=true` completed with 0 warnings and 0
errors, with no generated `LangVersion` or `EnablePreviewFeatures`
entries.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
devanathan-vaithiyanathan pushed a commit to devanathan-vaithiyanathan/maui that referenced this pull request Jul 8, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

- Updates the sample-content MAUI template to use
`CommunityToolkit.Mvvm` 8.4.2.
- Converts template page models from field-backed `[ObservableProperty]`
members to partial observable properties without enabling preview
language features.
- Switches the sample-content SQLitePCLRaw dependency from
`bundle_green` to `bundle_e_sqlite3` 3.0.3 and updates cgmanifest
version mapping so generated projects avoid default NuGet audit
warnings.

- `dotnet build .\src\Templates\src\Microsoft.Maui.Templates.csproj
-p:UpdateCgManifestBeforeBuild=false -p:GenerateCgManifest=false`
- Packed templates and generated a `dotnet new maui --sample-content
true` app from an isolated template hive.
- `dotnet build <generated app> -f net10.0-windows10.0.19041.0
-p:RestoreIgnoreFailedSources=true` completed with 0 warnings and 0
errors, with no generated `LangVersion` or `EnablePreviewFeatures`
entries.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 1, 2026

This branch was previously deployed

1 inactive deployment
gh-aw-agents — 9b91adcf Deployed Jun 23, 2026 by jfversluis via conclusion #525
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-templates Project templates, Item Templates for Blazor and MAUI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants