diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 39c342ce9e..759e9c6a7d 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -13,7 +13,7 @@ on: - '*' env: - LATEST_NET_VERSION: '9.0.x' + LATEST_NET_VERSION: '10.0.x' PathToCommunityToolkitAnalyzersBenchmarkCsproj: 'src/CommunityToolkit.Maui.Analyzers.Benchmarks/CommunityToolkit.Maui.Analyzers.Benchmarks.csproj' concurrency: @@ -42,7 +42,7 @@ jobs: uses: actions/setup-dotnet@v5 with: dotnet-version: ${{ env.LATEST_NET_VERSION }} - dotnet-quality: 'ga' + dotnet-quality: 'preview' - name: Install .NET MAUI Workload run: | diff --git a/.github/workflows/dotnet-build.yml b/.github/workflows/dotnet-build.yml index 8663322c49..744864eb28 100644 --- a/.github/workflows/dotnet-build.yml +++ b/.github/workflows/dotnet-build.yml @@ -22,10 +22,10 @@ env: NugetPackageVersionCamera: '99.0.0-preview${{ github.run_number }}' NugetPackageVersionMediaElement: '99.0.0-preview${{ github.run_number }}' NugetPackageVersionMaps: '99.0.0-preview${{ github.run_number }}' - TOOLKIT_NET_VERSION: '9.0.306' - LATEST_NET_VERSION: '9.0.x' - PathToLibrarySolution: 'src/CommunityToolkit.Maui.sln' - PathToSamplesSolution: 'samples/CommunityToolkit.Maui.Sample.sln' + TOOLKIT_NET_VERSION: '10.0.x' + LATEST_NET_VERSION: '10.0.x' + PathToLibrarySolution: 'src/CommunityToolkit.Maui.slnx' + PathToSamplesSolution: 'samples/CommunityToolkit.Maui.Sample.slnx' PathToCommunityToolkitCsproj: 'src/CommunityToolkit.Maui/CommunityToolkit.Maui.csproj' PathToCommunityToolkitCoreCsproj: 'src/CommunityToolkit.Maui.Core/CommunityToolkit.Maui.Core.csproj' PathToCommunityToolkitCameraCsproj: 'src/CommunityToolkit.Maui.Camera/CommunityToolkit.Maui.Camera.csproj' @@ -71,12 +71,12 @@ jobs: uses: actions/setup-dotnet@v5 with: dotnet-version: ${{ env.LATEST_NET_VERSION }} - dotnet-quality: 'ga' + dotnet-quality: 'preview' - uses: actions/setup-java@v5 with: distribution: 'microsoft' - java-version: '17' + java-version: '21' - name: Install .NET MAUI Workload run: | @@ -145,7 +145,7 @@ jobs: uses: actions/setup-dotnet@v5 with: dotnet-version: ${{ env.TOOLKIT_NET_VERSION }} - dotnet-quality: 'ga' + dotnet-quality: 'preview' - uses: actions/setup-java@v5 with: @@ -203,7 +203,7 @@ jobs: run: dotnet build ${{ env.PathToCommunityToolkitCoreCsproj }} -c Release -p:PackageVersion=${{ env.NugetPackageVersion }} -p:Version=${{ env.NugetPackageVersion }} - name: 'Build CommunityToolkit.Maui' - run: dotnet build ${{ env.PathToLibrarySolution }} -c Release -p:PackageVersion=${{ env.NugetPackageVersion }} -p:Version=${{ env.NugetPackageVersion }} + run: dotnet build ${{ env.PathToCommunityToolkitCsproj }} -c Release -p:PackageVersion=${{ env.NugetPackageVersion }} -p:Version=${{ env.NugetPackageVersion }} - name: Run CommunityToolkit Analyzers UnitTests run: | @@ -273,7 +273,7 @@ jobs: uses: actions/setup-dotnet@v5 with: dotnet-version: ${{ env.TOOLKIT_NET_VERSION }} - dotnet-quality: 'ga' + dotnet-quality: 'preview' - name: Download NuGet List uses: actions/download-artifact@v6 @@ -345,7 +345,7 @@ jobs: uses: actions/setup-dotnet@v5 with: dotnet-version: ${{ env.TOOLKIT_NET_VERSION }} - dotnet-quality: 'ga' + dotnet-quality: 'preview' - name: Download signed packages uses: actions/download-artifact@v6 @@ -373,7 +373,7 @@ jobs: uses: actions/setup-dotnet@v5 with: dotnet-version: ${{ env.TOOLKIT_NET_VERSION }} - dotnet-quality: 'ga' + dotnet-quality: 'preview' - name: Download signed packages uses: actions/download-artifact@v6 diff --git a/Directory.Build.props b/Directory.Build.props index d5f741ed02..6a4cf974e7 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -2,8 +2,8 @@ enable - NETSDK1023 - net9.0 + NETSDK1023;XCODE_26_0_PREVIEW + net10.0 preview enable true @@ -16,10 +16,11 @@ all - 9.0.120 + 10.0.0-rc.2.25504.7 true true true + SourceGen + $(BaseIntermediateOutputPath)\GeneratedFiles --> true - - CsWinRT1028 + IL2026 - - - - true + AND $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) != 'windows'"> + + false + true + partial @@ -63,11 +61,11 @@ - + - + diff --git a/samples/CommunityToolkit.Maui.Sample/MauiProgram.cs b/samples/CommunityToolkit.Maui.Sample/MauiProgram.cs index 1dd763355a..24cc21bcb2 100644 --- a/samples/CommunityToolkit.Maui.Sample/MauiProgram.cs +++ b/samples/CommunityToolkit.Maui.Sample/MauiProgram.cs @@ -47,7 +47,6 @@ namespace CommunityToolkit.Maui.Sample; public static class MauiProgram { - [RequiresUnreferencedCode($"{nameof(CommunityToolkit.Maui.Views.Expander)} and {nameof(TouchBehaviorCollectionViewMultipleSelectionPage)} are not type safe")] public static MauiApp CreateMauiApp() { var builder = MauiApp.CreateBuilder() @@ -136,7 +135,6 @@ public static MauiApp CreateMauiApp() return builder.Build(); } - [RequiresUnreferencedCode("Calls CommunityToolkit.Maui.Sample.MauiProgram.AddTransientWithShellRoute()")] static void RegisterViewsAndViewModels(in IServiceCollection services) { // Add Gallery Pages + ViewModels diff --git a/samples/CommunityToolkit.Maui.Sample/Pages/Base/BasePage.cs b/samples/CommunityToolkit.Maui.Sample/Pages/Base/BasePage.cs index 50801ecc53..1fa93b7ae2 100644 --- a/samples/CommunityToolkit.Maui.Sample/Pages/Base/BasePage.cs +++ b/samples/CommunityToolkit.Maui.Sample/Pages/Base/BasePage.cs @@ -13,6 +13,7 @@ public abstract class BasePage(TViewModel viewModel, bool shouldUseS public abstract class BasePage : ContentPage { + [Obsolete] protected BasePage(object? viewModel = null, bool shouldUseSafeArea = true) { BindingContext = viewModel; diff --git a/samples/CommunityToolkit.Maui.Sample/Pages/Behaviors/AnimationBehaviorPage.xaml.cs b/samples/CommunityToolkit.Maui.Sample/Pages/Behaviors/AnimationBehaviorPage.xaml.cs index 5daca3439f..b2bd895841 100644 --- a/samples/CommunityToolkit.Maui.Sample/Pages/Behaviors/AnimationBehaviorPage.xaml.cs +++ b/samples/CommunityToolkit.Maui.Sample/Pages/Behaviors/AnimationBehaviorPage.xaml.cs @@ -15,8 +15,8 @@ partial class SampleScaleAnimation : BaseAnimation { public override async Task Animate(VisualElement view, CancellationToken token) { - await view.ScaleTo(1.2, Length, Easing).WaitAsync(token); - await view.ScaleTo(1, Length, Easing).WaitAsync(token); + await view.ScaleToAsync(1.2, Length, Easing).WaitAsync(token); + await view.ScaleToAsync(1, Length, Easing).WaitAsync(token); } } @@ -25,5 +25,5 @@ partial class SampleScaleToAnimation : BaseAnimation public double Scale { get; set; } public override Task Animate(VisualElement view, CancellationToken token) - => view.ScaleTo(Scale, Length, Easing).WaitAsync(token); + => view.ScaleToAsync(Scale, Length, Easing).WaitAsync(token); } \ No newline at end of file diff --git a/samples/CommunityToolkit.Maui.Sample/Pages/Behaviors/CharactersValidationBehaviorPage.xaml b/samples/CommunityToolkit.Maui.Sample/Pages/Behaviors/CharactersValidationBehaviorPage.xaml index 8babb0296e..7e243672ba 100644 --- a/samples/CommunityToolkit.Maui.Sample/Pages/Behaviors/CharactersValidationBehaviorPage.xaml +++ b/samples/CommunityToolkit.Maui.Sample/Pages/Behaviors/CharactersValidationBehaviorPage.xaml @@ -23,7 +23,7 @@ + VerticalOptions="Start"> \ No newline at end of file diff --git a/samples/CommunityToolkit.Maui.Sample/Pages/Behaviors/MaxLengthReachedBehaviorPage.xaml b/samples/CommunityToolkit.Maui.Sample/Pages/Behaviors/MaxLengthReachedBehaviorPage.xaml index 41aadb5467..049c9e6b84 100644 --- a/samples/CommunityToolkit.Maui.Sample/Pages/Behaviors/MaxLengthReachedBehaviorPage.xaml +++ b/samples/CommunityToolkit.Maui.Sample/Pages/Behaviors/MaxLengthReachedBehaviorPage.xaml @@ -30,7 +30,7 @@ VerticalTextAlignment="Center" /> diff --git a/samples/CommunityToolkit.Maui.Sample/Pages/Behaviors/MultiValidationBehaviorPage.xaml b/samples/CommunityToolkit.Maui.Sample/Pages/Behaviors/MultiValidationBehaviorPage.xaml index f2539b9b33..8b725ac22a 100644 --- a/samples/CommunityToolkit.Maui.Sample/Pages/Behaviors/MultiValidationBehaviorPage.xaml +++ b/samples/CommunityToolkit.Maui.Sample/Pages/Behaviors/MultiValidationBehaviorPage.xaml @@ -22,7 +22,7 @@ + VerticalOptions="Start">