Skip to content

Commit 2c03b7f

Browse files
Merge branch 'main' into feature/stephenquan/math-ar
2 parents 77be4e0 + 3e8586f commit 2c03b7f

File tree

94 files changed

+2650
-640
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+2650
-640
lines changed

.github/prompts/dotnet/codestyle.prompt.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,12 @@ This guide provides a set of best practices and coding standards for writing C#
581581

582582
### Element Positioning
583583

584-
Please adhere to [Style Cop SA1201](https://docs.github.com/en/copilot/using-github-copilot/code-review/configuring-coding-guidelines#creating-a-coding-guideline) for organizing code in a file.
584+
Please adhere to the following Style Cop rules for organizing code in a file:
585+
- [Style Cop SA1201](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1201.md)
586+
- [Style Cop SA1202](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1202.md)
587+
- [Style Cop SA1204](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1204.md)
588+
- [Style Cop SA1214](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1214.md)
589+
- [Style Cop SA1215](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1215.md)
585590

586591
Elements at the file root level or within a namespace should be positioned in the following order:
587592

@@ -609,4 +614,4 @@ Indexers
609614
Methods
610615
Records
611616
Structs
612-
Classes
617+
Classes

.github/workflows/benchmarks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
xcode-version: latest-stable
4040

4141
- name: Install Latest Version of .NET, v${{ env.LATEST_NET_VERSION }}
42-
uses: actions/setup-dotnet@v4
42+
uses: actions/setup-dotnet@v5
4343
with:
4444
dotnet-version: ${{ env.LATEST_NET_VERSION }}
4545
dotnet-quality: 'ga'

.github/workflows/dotnet-build.yml

Lines changed: 53 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ env:
2222
NugetPackageVersionCamera: '99.0.0-preview${{ github.run_number }}'
2323
NugetPackageVersionMediaElement: '99.0.0-preview${{ github.run_number }}'
2424
NugetPackageVersionMaps: '99.0.0-preview${{ github.run_number }}'
25-
TOOLKIT_NET_VERSION: '9.0.300'
25+
TOOLKIT_NET_VERSION: '9.0.306'
2626
LATEST_NET_VERSION: '9.0.x'
2727
PathToLibrarySolution: 'src/CommunityToolkit.Maui.sln'
2828
PathToSamplesSolution: 'samples/CommunityToolkit.Maui.Sample.sln'
@@ -43,7 +43,7 @@ env:
4343
PathToCommunityToolkitMediaElementAnalyzersCodeFixCsproj: 'src/CommunityToolkit.Maui.MediaElement.Analyzers.CodeFixes/CommunityToolkit.Maui.MediaElement.Analyzers.CodeFixes.csproj'
4444
PathToCommunityToolkitAnalyzersUnitTestProjectDirectory: 'src/CommunityToolkit.Maui.Analyzers.UnitTests'
4545
PathToCommunityToolkitAnalyzersBenchmarkCsproj: 'src/CommunityToolkit.Maui.Analyzers.Benchmarks/CommunityToolkit.Maui.Analyzers.Benchmarks.csproj'
46-
CommunityToolkitLibrary_Xcode_Version: '16.2'
46+
CommunityToolkitLibrary_Xcode_Version: '26.0.1'
4747

4848
concurrency:
4949
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
@@ -59,7 +59,7 @@ jobs:
5959
os: [windows-latest, macos-15]
6060
steps:
6161
- name: Checkout code
62-
uses: actions/checkout@v4
62+
uses: actions/checkout@v5
6363

6464
- name: Set Latest Xcode Version
6565
if: runner.os == 'macOS'
@@ -68,12 +68,12 @@ jobs:
6868
xcode-version: latest-stable
6969

7070
- name: Install Latest .NET SDK, v${{ env.LATEST_NET_VERSION }}
71-
uses: actions/setup-dotnet@v4
71+
uses: actions/setup-dotnet@v5
7272
with:
7373
dotnet-version: ${{ env.LATEST_NET_VERSION }}
7474
dotnet-quality: 'ga'
7575

76-
- uses: actions/setup-java@v4
76+
- uses: actions/setup-java@v5
7777
with:
7878
distribution: 'microsoft'
7979
java-version: '17'
@@ -104,7 +104,7 @@ jobs:
104104
os: [windows-latest, macos-15]
105105
steps:
106106
- name: Checkout code
107-
uses: actions/checkout@v4
107+
uses: actions/checkout@v5
108108

109109
- name: Set NuGet Version to Tag Number
110110
if: startsWith(github.ref, 'refs/tags/') && (!endsWith(github.ref, '-mediaelement') && !endsWith(github.ref, '-camera') && !endsWith(github.ref, '-maps'))
@@ -113,17 +113,17 @@ jobs:
113113

114114
- name: Set NuGet Version to Tag Number for Camera
115115
if: startsWith(github.ref, 'refs/tags/') && endsWith(github.ref, '-camera')
116-
run: echo "NugetPackageVersionCamera=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
116+
run: echo "NugetPackageVersionCamera=${GITHUB_REF#refs/tags/}" | sed 's/-camera$//' >> $GITHUB_ENV
117117
shell: bash
118118

119119
- name: Set NuGet Version to Tag Number for MediaElement
120120
if: startsWith(github.ref, 'refs/tags/') && endsWith(github.ref, '-mediaelement')
121-
run: echo "NugetPackageVersionMediaElement=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
121+
run: echo "NugetPackageVersionMediaElement=${GITHUB_REF#refs/tags/}" | sed 's/-mediaelement$//' >> $GITHUB_ENV
122122
shell: bash
123123

124124
- name: Set NuGet Version to Tag Number for Maps
125125
if: startsWith(github.ref, 'refs/tags/') && endsWith(github.ref, '-maps')
126-
run: echo "NugetPackageVersionMaps=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
126+
run: echo "NugetPackageVersionMaps=${GITHUB_REF#refs/tags/}" | sed 's/-maps$//' >> $GITHUB_ENV
127127
shell: bash
128128

129129
- name: Set NuGet Version to PR Version
@@ -142,12 +142,12 @@ jobs:
142142
xcode-version: ${{ env.CommunityToolkitLibrary_Xcode_Version }}
143143

144144
- name: Install .NET SDK v${{ env.TOOLKIT_NET_VERSION }}
145-
uses: actions/setup-dotnet@v4
145+
uses: actions/setup-dotnet@v5
146146
with:
147147
dotnet-version: ${{ env.TOOLKIT_NET_VERSION }}
148148
dotnet-quality: 'ga'
149149

150-
- uses: actions/setup-java@v4
150+
- uses: actions/setup-java@v5
151151
with:
152152
distribution: 'microsoft'
153153
java-version: '17'
@@ -191,13 +191,13 @@ jobs:
191191
run: dotnet build ${{ env.PathToCommunityToolkitSourceGeneratorsInternalCsproj }} -c Release
192192

193193
- name: 'Build CommunityToolkit.Maui.Camera'
194-
run: dotnet build ${{ env.PathToCommunityToolkitCameraCsproj }} -c Release -p:PackageVersion=${{ env.NugetPackageVersionCamera }} -p:Version=${{ env.NugetPackageVersion }}
194+
run: dotnet build ${{ env.PathToCommunityToolkitCameraCsproj }} -c Release -p:PackageVersion=${{ env.NugetPackageVersionCamera }} -p:Version=${{ env.NugetPackageVersionCamera }}
195195

196196
- name: 'Build CommunityToolkit.Maui.MediaElement'
197-
run: dotnet build ${{ env.PathToCommunityToolkitMediaElementCsproj }} -c Release -p:PackageVersion=${{ env.NugetPackageVersionMediaElement }} -p:Version=${{ env.NugetPackageVersion }}
197+
run: dotnet build ${{ env.PathToCommunityToolkitMediaElementCsproj }} -c Release -p:PackageVersion=${{ env.NugetPackageVersionMediaElement }} -p:Version=${{ env.NugetPackageVersionMediaElement }}
198198

199199
- name: 'Build CommunityToolkit.Maui.Maps'
200-
run: dotnet build ${{ env.PathToCommunityToolkitMapsCsproj }} -c Release -p:PackageVersion=${{ env.NugetPackageVersionMaps }} -p:Version=${{ env.NugetPackageVersion }}
200+
run: dotnet build ${{ env.PathToCommunityToolkitMapsCsproj }} -c Release -p:PackageVersion=${{ env.NugetPackageVersionMaps }} -p:Version=${{ env.NugetPackageVersionMaps }}
201201

202202
- name: 'Build CommunityToolkit.Maui.Core'
203203
run: dotnet build ${{ env.PathToCommunityToolkitCoreCsproj }} -c Release -p:PackageVersion=${{ env.NugetPackageVersion }} -p:Version=${{ env.NugetPackageVersion }}
@@ -224,19 +224,19 @@ jobs:
224224
shell: bash
225225

226226
- name: Pack CommunityToolkit.Maui.Core NuGet
227-
run: dotnet pack -c Release ${{ env.PathToCommunityToolkitCoreCsproj }} -p:PackageVersion=${{ env.NugetPackageVersion }}
227+
run: dotnet pack -c Release ${{ env.PathToCommunityToolkitCoreCsproj }} -p:PackageVersion=${{ env.NugetPackageVersion }} -p:Version=${{ env.NugetPackageVersion }}
228228

229229
- name: Pack CommunityToolkit.Maui NuGet
230-
run: dotnet pack -c Release ${{ env.PathToCommunityToolkitCsproj }} -p:PackageVersion=${{ env.NugetPackageVersion }}
230+
run: dotnet pack -c Release ${{ env.PathToCommunityToolkitCsproj }} -p:PackageVersion=${{ env.NugetPackageVersion }} -p:Version=${{ env.NugetPackageVersion }}
231231

232232
- name: Pack CommunityToolkit.Maui.Camera NuGet
233-
run: dotnet pack -c Release ${{ env.PathToCommunityToolkitCameraCsproj }} -p:PackageVersion=${{ env.NugetPackageVersionCamera }}
233+
run: dotnet pack -c Release ${{ env.PathToCommunityToolkitCameraCsproj }} -p:PackageVersion=${{ env.NugetPackageVersionCamera }} -p:Version=${{ env.NugetPackageVersionCamera }}
234234

235235
- name: Pack CommunityToolkit.Maui.MediaElement NuGet
236-
run: dotnet pack -c Release ${{ env.PathToCommunityToolkitMediaElementCsproj }} -p:PackageVersion=${{ env.NugetPackageVersionMediaElement }}
236+
run: dotnet pack -c Release ${{ env.PathToCommunityToolkitMediaElementCsproj }} -p:PackageVersion=${{ env.NugetPackageVersionMediaElement }} -p:Version=${{ env.NugetPackageVersionMediaElement }}
237237

238238
- name: Pack CommunityToolkit.Maui.Maps NuGet
239-
run: dotnet pack -c Release ${{ env.PathToCommunityToolkitMapsCsproj }} -p:PackageVersion=${{ env.NugetPackageVersionMaps }}
239+
run: dotnet pack -c Release ${{ env.PathToCommunityToolkitMapsCsproj }} -p:PackageVersion=${{ env.NugetPackageVersionMaps }} -p:Version=${{ env.NugetPackageVersionMaps }}
240240

241241
- name: Copy NuGet Packages to Staging Directory
242242
if: ${{ runner.os == 'Windows' }} && !startsWith(github.ref, 'refs/tags/')
@@ -263,26 +263,26 @@ jobs:
263263

264264
sign:
265265
needs: [build_library]
266-
if: ${{ startsWith(github.ref, 'refs/tags/') }}
266+
if: ${{ startsWith(github.ref, 'refs/tags/') || (github.event_name != 'pull_request') }}
267267
runs-on: windows-latest
268268
permissions:
269269
id-token: write # Required for requesting the JWT
270270

271271
steps:
272272
- name: Install .NET SDK v${{ env.TOOLKIT_NET_VERSION }}
273-
uses: actions/setup-dotnet@v4
273+
uses: actions/setup-dotnet@v5
274274
with:
275275
dotnet-version: ${{ env.TOOLKIT_NET_VERSION }}
276276
dotnet-quality: 'ga'
277277

278278
- name: Download NuGet List
279-
uses: actions/download-artifact@v4
279+
uses: actions/download-artifact@v5
280280
with:
281281
name: nuget-list
282282
path: ./
283283

284284
- name: Download Package List
285-
uses: actions/download-artifact@v4
285+
uses: actions/download-artifact@v5
286286
with:
287287
name: packages
288288
path: ./packages
@@ -335,21 +335,48 @@ jobs:
335335
path: |
336336
${{ github.workspace }}/packages/**/*.nupkg
337337
338-
release:
338+
release-main:
339+
if: ${{ github.event_name != 'pull_request' && !startsWith(github.ref, 'refs/tags/') }}
340+
needs: [sign]
341+
runs-on: ubuntu-latest
342+
343+
steps:
344+
- name: Install .NET SDK
345+
uses: actions/setup-dotnet@v5
346+
with:
347+
dotnet-version: ${{ env.TOOLKIT_NET_VERSION }}
348+
dotnet-quality: 'ga'
349+
350+
- name: Download signed packages
351+
uses: actions/download-artifact@v5
352+
with:
353+
name: signed-packages
354+
path: ./packages
355+
356+
- name: Upload artifact
357+
if: github.event_name != 'pull_request'
358+
run: >
359+
dotnet nuget push
360+
**/*.nupkg
361+
--source "https://nuget.pkg.github.com/CommunityToolkit/index.json"
362+
--api-key ${{ secrets.GITHUB_TOKEN }}
363+
--skip-duplicate
364+
365+
release-nuget:
339366
if: ${{ startsWith(github.ref, 'refs/tags/') }}
340367
needs: [sign]
341368
environment: nuget-release-gate # This gates this job until manually approved
342369
runs-on: ubuntu-latest
343370

344371
steps:
345372
- name: Install .NET SDK
346-
uses: actions/setup-dotnet@v4
373+
uses: actions/setup-dotnet@v5
347374
with:
348375
dotnet-version: ${{ env.TOOLKIT_NET_VERSION }}
349376
dotnet-quality: 'ga'
350377

351378
- name: Download signed packages
352-
uses: actions/download-artifact@v4
379+
uses: actions/download-artifact@v5
353380
with:
354381
name: signed-packages
355382
path: ./packages

.github/workflows/dotnet-format-daily.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
run: dotnet tool install -g dotnet-format
1111

1212
- name: Checkout repo
13-
uses: actions/checkout@v4
13+
uses: actions/checkout@v5
1414
with:
1515
ref: ${{ github.head_ref }}
1616

.github/workflows/locker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
runs-on: ubuntu-latest
2323
steps:
2424
- name: Checkout Actions
25-
uses: actions/checkout@v4
25+
uses: actions/checkout@v5
2626
with:
2727
repository: "microsoft/vscode-github-triage-actions"
2828
path: ./actions

Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<NuGetAuditMode>all</NuGetAuditMode>
1717

1818
<!-- MAUI Specific -->
19-
<MauiPackageVersion>9.0.80</MauiPackageVersion>
19+
<MauiPackageVersion>9.0.111</MauiPackageVersion>
2020
<NextMauiPackageVersion>10.0.0</NextMauiPackageVersion>
2121
<MauiStrictXamlCompilation>true</MauiStrictXamlCompilation>
2222
<SkipValidateMauiImplicitPackageReferences>true</SkipValidateMauiImplicitPackageReferences>
@@ -240,4 +240,4 @@
240240
<PropertyGroup Condition="('$(TF_BUILD)' == 'true' OR '$(GITHUB_ACTIONS)' == 'true') and $([MSBuild]::IsOSPlatform('windows')) == 'true'">
241241
<IncludeTizenTargetFrameworks>true</IncludeTizenTargetFrameworks>
242242
</PropertyGroup>
243-
</Project>
243+
</Project>

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,32 @@ All of the [documentation](https://learn.microsoft.com/dotnet/communitytoolkit/m
1818

1919
https://learn.microsoft.com/dotnet/communitytoolkit/maui/get-started
2020

21+
## Installation
22+
23+
The release versions of .NET MAUI Community Toolkit are available at Nuget.org as NuGet packages. You can install them using the following commands in your terminal or Package Manager Console:
24+
25+
```bash
26+
dotnet add package CommunityToolkit.Maui
27+
dotnet add package CommunityToolkit.Maui.MediaElement
28+
dotnet add package CommunityToolkit.Maui.Maps
29+
dotnet add package CommunityToolkit.Maui.Camera
30+
```
31+
32+
You can also try the latest pre-release version of the main branch. We use GitHub Packages to host the pre-release versions of the .NET MAUI Community Toolkit. To install the pre-release version, you need to add the GitHub Packages source to your NuGet configuration. GitHub Packages only supports authentication using a personal access token (classic) (https://github.com/settings/tokens). For more information, see [Managing your personal access tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token). You can use a personal access token (classic) to authenticate to GitHub Packages. When you create a personal access token (classic), you can assign the token different scopes depending on your needs, but `read:packages` is enough.
33+
34+
```bash
35+
dotnet nuget add source https://nuget.pkg.github.com/CommunityToolkit/index.json -n CommunityToolkitGitHubNuget -u YOUR_GITHUB_USERNAME -p YOUR_GITHUB_PERSONAL_ACCESS_TOKEN
36+
```
37+
38+
and then install the packages as follows:
39+
40+
```bash
41+
dotnet add package CommunityToolkit.Maui --version 99.0.0-preview980
42+
dotnet add package CommunityToolkit.Maui.MediaElement --version 99.0.0-preview980
43+
dotnet add package CommunityToolkit.Maui.Maps --version 99.0.0-preview980
44+
dotnet add package CommunityToolkit.Maui.Camera --version 99.0.0-preview980
45+
```
46+
2147
## Getting Started
2248

2349
In order to use the .NET MAUI Community Toolkit you need to call the extension method in your `MauiProgram.cs` file as follows:

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "9.0.300",
3+
"version": "9.0.306",
44
"rollForward": "latestFeature",
55
"allowPrerelease": false
66
}

samples/CommunityToolkit.Maui.Sample/CommunityToolkit.Maui.Sample.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@
6464
<MauiFont Include="Resources\Fonts\*" />
6565

6666
<PackageReference Include="Microsoft.Maui.Controls" Version="*" />
67-
<PackageReference Include="CommunityToolkit.Maui.Markup" Version="6.0.0" />
67+
<PackageReference Include="CommunityToolkit.Maui.Markup" Version="6.0.1" />
6868
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
69-
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="9.5.0" />
70-
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.5" />
69+
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="9.10.0" />
70+
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.10" />
7171
</ItemGroup>
7272

7373
<PropertyGroup>

samples/CommunityToolkit.Maui.Sample/MauiProgram.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ public static MauiApp CreateMauiApp()
5555
.UseMauiCommunityToolkit(static options =>
5656
{
5757
options.SetShouldEnableSnackbarOnWindows(true);
58+
options.SetPopupDefaults(new DefaultPopupSettings());
59+
options.SetPopupOptionsDefaults(new DefaultPopupOptionsSettings());
5860
})
5961
#else
6062
.UseMauiCommunityToolkit(static options =>
@@ -269,6 +271,7 @@ static void RegisterViewsAndViewModels(in IServiceCollection services)
269271
// Add Popups
270272
services.AddTransientPopup<ApplyToDerivedTypesPopup>();
271273
services.AddTransientPopup<ButtonPopup>();
274+
services.AddTransientPopup<ComplexPopup, ComplexPopupViewModel>();
272275
services.AddTransientPopup<CsharpBindingPopup, CsharpBindingPopupViewModel>();
273276
services.AddTransientPopup<DynamicStyleInheritancePopup>();
274277
services.AddTransientPopup<DynamicStylePopup>();

0 commit comments

Comments
 (0)