Skip to content
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
7b1c314
Update to .NET 10
TheCodeTraveler Oct 7, 2025
9016056
Update CommunityToolkit.Maui.Markup.UnitTests.csproj
TheCodeTraveler Oct 7, 2025
ba7b9fe
Update Directory.Build.props
TheCodeTraveler Oct 7, 2025
2faecdc
Update dotnet-build.yml
TheCodeTraveler Oct 7, 2025
90ef438
Update dotnet-build.yml
TheCodeTraveler Oct 7, 2025
4521969
Remove `RequiresUnreferencedCodeAttribute`
TheCodeTraveler Oct 7, 2025
dc4ab8a
`dotnet format`
TheCodeTraveler Oct 7, 2025
7238eed
Remove AOT
TheCodeTraveler Oct 7, 2025
7ff440a
Update CommunityToolkit.Maui.Markup.Sample.csproj
TheCodeTraveler Oct 7, 2025
5419747
Update Directory.Build.props
TheCodeTraveler Oct 7, 2025
038297c
Update to .NET 10 RC 2
TheCodeTraveler Oct 14, 2025
c32d981
Merge branch 'main' into Update-to-.NET-10
TheCodeTraveler Nov 6, 2025
a1b69d0
Remove `NextMauiPackageVersion`
TheCodeTraveler Nov 6, 2025
38b2106
Merge branch 'main' into Update-to-.NET-10
TheCodeTraveler Nov 6, 2025
baa638e
Use `macos-26`
TheCodeTraveler Nov 10, 2025
6e85055
Use `env.Xcode_Version`
TheCodeTraveler Nov 11, 2025
e797438
Revert `preview`
TheCodeTraveler Nov 11, 2025
6a7b3ec
Use `ga`
TheCodeTraveler Nov 11, 2025
1b0c68e
Migrate to `slnx`
TheCodeTraveler Nov 11, 2025
67cda55
Revert `Microsoft.CodeAnalysis.CSharp` to latest stable release
TheCodeTraveler Nov 11, 2025
451a6ad
Update MauiPackageVersion to 10.0.0
TheCodeTraveler Nov 11, 2025
945dedc
Refactor TypedBindingExtensionsTests to use button
TheCodeTraveler Nov 11, 2025
65d2095
Update Directory.Build.props
TheCodeTraveler Nov 11, 2025
29eb001
Update NuGet Packages
TheCodeTraveler Nov 11, 2025
f5ff736
Merge branch 'Update-to-.NET-10' of https://github.com/CommunityToolk…
TheCodeTraveler Nov 11, 2025
41265bf
update to `macos-26`
TheCodeTraveler Nov 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
- '*'

env:
LATEST_NET_VERSION: '9.0.x'
LATEST_NET_VERSION: '10.0.x'
PathToCommunityToolkitBenchmarkCsproj: 'src/CommunityToolkit.Maui.Markup.Benchmarks/CommunityToolkit.Maui.Markup.Benchmarks.csproj'

concurrency:
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/dotnet-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ env:
# When we create a tag, we set the NuGet version to the tag number, the below values are only for PR builds.
CurrentSemanticVersionBase: '99.0.0' # Only used for PR builds
NugetPackageVersion: '99.0.0-preview${{ github.run_number }}' # Only used for PR builds
NET_VERSION: '9.0.x'
NET_VERSION: '10.0.x'
RunPoliCheck: false
PathToLibrarySolution: 'src/CommunityToolkit.Maui.Markup.sln'
PathToSamplesSolution: 'samples/CommunityToolkit.Maui.Markup.Sample.sln'
PathToLibrarySolution: 'src/CommunityToolkit.Maui.Markup.slnx'
PathToSamplesSolution: 'samples/CommunityToolkit.Maui.Markup.Sample.slnx'
PathToCommunityToolkitCsproj: 'src/CommunityToolkit.Maui.Markup/CommunityToolkit.Maui.Markup.csproj'
PathToCommunityToolkitSampleCsproj: 'samples/CommunityToolkit.Maui.Markup.Sample/CommunityToolkit.Maui.Markup.Sample.csproj'
PathToCommunityToolkitUnitTestCsproj: 'src/CommunityToolkit.Maui.Markup.UnitTests/CommunityToolkit.Maui.Markup.UnitTests.csproj'
PathToCommunityToolkitSourceGeneratorsCsproj: 'src/CommunityToolkit.Maui.Markup.SourceGenerators/CommunityToolkit.Maui.Markup.SourceGenerators.csproj'
Xcode_Version: '16.3'
Xcode_Version: '26.0.1'
ShouldCheckDependencies: true

concurrency:
Expand All @@ -40,7 +40,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-15]
os: [windows-latest, macos-26]
steps:
- name: Checkout code
uses: actions/checkout@v5
Expand All @@ -49,7 +49,7 @@ jobs:
if: runner.os == 'macOS'
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
xcode-version: ${{ env.Xcode_Version }}

- name: Install Latest .NET SDK, v${{ env.NET_VERSION }}
uses: actions/setup-dotnet@v5
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-15]
os: [windows-latest, macos-26]
steps:
- name: Checkout code
uses: actions/checkout@v5
Expand Down
9 changes: 4 additions & 5 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<Project>
<PropertyGroup>
<Nullable>enable</Nullable>
<NoWarn>NETSDK1023</NoWarn>
<NetVersion>net9.0</NetVersion>
<NoWarn>NETSDK1023;XCODE_26_0_PREVIEW</NoWarn>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need 26 preview?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unsure! I'll remove it now and see what happens

<NetVersion>net10.0</NetVersion>
<LangVersion>preview</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
Expand All @@ -20,8 +20,7 @@
<NuGetAuditMode>all</NuGetAuditMode>

<!-- MAUI Specific -->
<MauiPackageVersion>9.0.120</MauiPackageVersion>
<NextMauiPackageVersion>10.0.0</NextMauiPackageVersion>
<MauiPackageVersion>10.0.0</MauiPackageVersion>
<MauiCommunityToolkitPackageVersion>12.3.0</MauiCommunityToolkitPackageVersion>
<MauiStrictXamlCompilation>true</MauiStrictXamlCompilation>
<SkipValidateMauiImplicitPackageReferences>true</SkipValidateMauiImplicitPackageReferences>
Expand Down Expand Up @@ -91,7 +90,7 @@
IL2090,IL2091,IL2092,IL2093,IL2094,IL2095,IL2096,IL2097,IL2098,IL2099,
IL2100,IL2101,IL2102,IL2103,IL2104,IL2105,IL2106,IL2107,IL2108,IL2109,
IL2110,IL2111,IL2112,IL2113,IL2114,IL2115,IL2116,IL2117,IL2118,IL2119,
IL2120,IL2121,IL2122,
IL2120,IL2121,IL2122,IL2123,
IL3050,IL3051,IL3052,IL3053,IL3054,IL3055,IL3056,
RS1038
</WarningsAsErrors>
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "9.0.203",
"version": "10.0.100",
"rollForward": "latestFeature",
"allowPrerelease": false
}
Expand Down
63 changes: 0 additions & 63 deletions samples/CommunityToolkit.Maui.Markup.Sample.sln

This file was deleted.

16 changes: 16 additions & 0 deletions samples/CommunityToolkit.Maui.Markup.Sample.slnx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<Solution>
<Folder Name="/Samples/">
<Project Path="CommunityToolkit.Maui.Markup.Sample/CommunityToolkit.Maui.Markup.Sample.csproj">
<Deploy />
</Project>
</Folder>
<Folder Name="/Solution Items/">
<File Path="../.editorconfig" />
<File Path="../Directory.Build.props" />
<File Path="../global.json" />
</Folder>
<Project Path="../src/CommunityToolkit.Maui.Markup.Benchmarks/CommunityToolkit.Maui.Markup.Benchmarks.csproj" />
<Project Path="../src/CommunityToolkit.Maui.Markup.SourceGenerators/CommunityToolkit.Maui.Markup.SourceGenerators.csproj" />
<Project Path="../src/CommunityToolkit.Maui.Markup.UnitTests/CommunityToolkit.Maui.Markup.UnitTests.csproj" />
<Project Path="../src/CommunityToolkit.Maui.Markup/CommunityToolkit.Maui.Markup.csproj" />
</Solution>
1 change: 0 additions & 1 deletion samples/CommunityToolkit.Maui.Markup.Sample/AppShell.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace CommunityToolkit.Maui.Markup.Sample;

[RequiresUnreferencedCode("SettingsViewModel Calls CommunityToolkit.Maui.Behaviors.NumericValidationBehavior.NumericValidationBehavior()")]
partial class AppShell : Shell
{
static readonly ReadOnlyDictionary<Type, string> pageRouteMappingDictionary = new Dictionary<Type, string>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@
<NoWarn>CsWinRT1028</NoWarn>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)' == 'Release' &#xD;&#xA; AND $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) != 'tizen'&#xD;&#xA; AND $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) != 'android'&#xD;&#xA; AND $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) != 'windows'">
<!-- Ahead-of-time compilation is not yet supported net8.0-tizen -->
<!-- Cross-OS native compilation is not supported net8.0-android -->
<!-- Windows causing build errors in azurepipelines.yml -->
<PublishAot>true</PublishAot>
<PropertyGroup Condition="'$(Configuration)' == 'Release'
AND $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) != 'windows'">
<!-- Windows error NETSDK1102: Optimizing assemblies for size is not supported for the selected publish configuration. -->

<PublishAot>false</PublishAot>
<PublishTrimmed>true</PublishTrimmed>
<TrimMode>partial</TrimMode>
</PropertyGroup>

<ItemGroup>
Expand Down Expand Up @@ -75,4 +77,8 @@
</PropertyGroup>
</Target>

<ItemGroup>
<TrimmerRootAssembly Include="CommunityToolkit.Maui" RootMode="All"/>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System.Diagnostics.CodeAnalysis;
namespace CommunityToolkit.Maui.Markup.Sample;

[RequiresUnreferencedCode("AppShell.GetRoute Requires Unreferenced Code")]
class HotReloadHandler : ICommunityToolkitHotReloadHandler
{
public async void OnHotReload(IReadOnlyList<Type> types)
Expand Down
4 changes: 1 addition & 3 deletions samples/CommunityToolkit.Maui.Markup.Sample/MauiProgram.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
using System.Diagnostics.CodeAnalysis;
using Microsoft.Extensions.Http.Resilience;
using Microsoft.Extensions.Http.Resilience;
using Polly;
using Refit;
namespace CommunityToolkit.Maui.Markup.Sample;

[RequiresUnreferencedCode("SettingsViewModel Calls CommunityToolkit.Maui.Behaviors.NumericValidationBehavior.NumericValidationBehavior()")]
public class MauiProgram
{
public static MauiApp CreateMauiApp()
Expand Down
12 changes: 3 additions & 9 deletions samples/CommunityToolkit.Maui.Markup.Sample/Pages/NewsPage.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
using System.Diagnostics.CodeAnalysis;

namespace CommunityToolkit.Maui.Markup.Sample.Pages;
namespace CommunityToolkit.Maui.Markup.Sample.Pages;

sealed partial class NewsPage : BaseContentPage<NewsViewModel>
{
readonly IDispatcher dispatcher;
readonly RefreshView refreshView;

[RequiresUnreferencedCode("AppShell.GetRoute Requires Unreferenced Code")]
public NewsPage(IDispatcher dispatcher,
NewsViewModel newsViewModel) : base(newsViewModel, "Top Stories")
{
Expand Down Expand Up @@ -49,7 +46,6 @@ protected override void OnAppearing()
static bool IsNullOrEmpty(in IEnumerable? enumerable) => !enumerable?.GetEnumerator().MoveNext() ?? true;
}

[RequiresUnreferencedCode("AppShell.GetRoute Requires Unreferenced Code")]
async void HandleSelectionChanged(object? sender, SelectionChangedEventArgs e)
{
ArgumentNullException.ThrowIfNull(sender);
Expand All @@ -65,13 +61,13 @@ async void HandleSelectionChanged(object? sender, SelectionChangedEventArgs e)
}
else
{
await DisplayAlert("Invalid Article", "ASK HN articles have no url", "OK");
await DisplayAlertAsync("Invalid Article", "ASK HN articles have no url", "OK");
}
}
}

async void HandlePullToRefreshFailed(object? sender, string message) =>
await dispatcher.DispatchAsync(() => DisplayAlert("Refresh Failed", message, "OK"));
await dispatcher.DispatchAsync(() => DisplayAlertAsync("Refresh Failed", message, "OK"));

bool TryRefreshCollectionView()
{
Expand All @@ -86,14 +82,12 @@ bool TryRefreshCollectionView()

void HandleNumberOfTopStoriesToFetchChanged(object? sender, int e) => TryRefreshCollectionView();

[RequiresUnreferencedCode("AppShell.GetRoute Requires Unreferenced Code")]
Task NavigateToSettingsPage() => dispatcher.DispatchAsync(() =>
{
var route = AppShell.GetRoute<SettingsPage, SettingsViewModel>();
return Shell.Current.GoToAsync(route);
});

[RequiresUnreferencedCode("AppShell.GetRoute Requires Unreferenced Code")]
Task NavigateToNewsDetailPage(StoryModel storyModel) => dispatcher.DispatchAsync(() =>
{
var route = AppShell.GetRoute<NewsDetailPage, NewsDetailViewModel>();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
using System.Diagnostics.CodeAnalysis;
using Microsoft.Maui.Layouts;
using Microsoft.Maui.Layouts;

namespace CommunityToolkit.Maui.Markup.Sample.Pages;

sealed partial class SettingsPage : BaseContentPage<SettingsViewModel>
{
[RequiresUnreferencedCode("Calls CommunityToolkit.Maui.Behaviors.NumericValidationBehavior.NumericValidationBehavior()")]
public SettingsPage(SettingsViewModel settingsViewModel) : base(settingsViewModel, "Settings")
{
Content = new AbsoluteLayout
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
using System.Diagnostics.CodeAnalysis;
using Foundation;
using Foundation;
namespace CommunityToolkit.Maui.Markup.Sample;

[Register(nameof(AppDelegate))]
[RequiresUnreferencedCode("SettingsViewModel Calls CommunityToolkit.Maui.Behaviors.NumericValidationBehavior.NumericValidationBehavior()")]
public class AppDelegate : MauiUIApplicationDelegate
{
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
using System.Diagnostics.CodeAnalysis;
using Foundation;
using Foundation;
namespace CommunityToolkit.Maui.Markup.Sample;

[Register(nameof(AppDelegate))]
[RequiresUnreferencedCode("SettingsViewModel Calls CommunityToolkit.Maui.Behaviors.NumericValidationBehavior.NumericValidationBehavior()")]
public class AppDelegate : MauiUIApplicationDelegate
{
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Windows.Input;
using BindableObjectViews;
using CommunityToolkit.Maui.Markup.UnitTests.Base;
using NUnit.Framework;
namespace CommunityToolkit.Maui.Markup.UnitTests
Expand Down Expand Up @@ -672,40 +671,40 @@ public void BindDefaultPropertyWithInlineTwoWayParameterizedConvertAndPositional
[Test]
public void BindCommandWithDefaults()
{
var textCell = new TextCell();
var button = new Button();
var path = nameof(viewModel.Command);

textCell.BindCommand(path);
button.BindCommand(path);

BindingHelpers.AssertBindingExists(textCell, TextCell.CommandProperty, path);
BindingHelpers.AssertBindingExists(textCell, TextCell.CommandParameterProperty);
BindingHelpers.AssertBindingExists(button, Button.CommandProperty, path);
BindingHelpers.AssertBindingExists(button, Button.CommandParameterProperty);
}

[Test]
public void BindCommandWithoutParameter()
{
var textCell = new TextCell();
var button = new Button();
var path = nameof(viewModel.Command);

textCell.BindCommand(path, parameterPath: null);
button.BindCommand(path, parameterPath: null);

BindingHelpers.AssertBindingExists(textCell, TextCell.CommandProperty, path);
Assert.That(BindingHelpers.GetBinding(textCell, TextCell.CommandParameterProperty), Is.Null);
BindingHelpers.AssertBindingExists(button, Button.CommandProperty, path);
Assert.That(BindingHelpers.GetBinding(button, Button.CommandParameterProperty), Is.Null);
}

[Test]
public void BindCommandWithPositionalParameters()
{
var textCell = new TextCell();
var button = new Button();
object source = new ViewModel();
var path = nameof(viewModel.Command);
var parameterPath = nameof(viewModel.Id);
object parameterSource = new ViewModel();

textCell.BindCommand(path, source, parameterPath, parameterSource);
button.BindCommand(path, source, parameterPath, parameterSource);

BindingHelpers.AssertBindingExists(textCell, TextCell.CommandProperty, path, source: source);
BindingHelpers.AssertBindingExists(textCell, TextCell.CommandParameterProperty, parameterPath, source: parameterSource);
BindingHelpers.AssertBindingExists(button, Button.CommandProperty, path, source: source);
BindingHelpers.AssertBindingExists(button, Button.CommandParameterProperty, parameterPath, source: parameterSource);
}

[Test]
Expand Down Expand Up @@ -747,7 +746,6 @@ public void SupportDerivedElements()
.Assign(out DerivedFromLabel assignDerivedFromLabel),
Is.InstanceOf<DerivedFromLabel>());

Assert.That(new DerivedFromTextCell().BindCommand(nameof(viewModel.Command)), Is.InstanceOf<DerivedFromTextCell>());
Assert.That(assignDerivedFromLabel, Is.InstanceOf<DerivedFromLabel>());
});
}
Expand Down Expand Up @@ -803,8 +801,4 @@ sealed class ViewModel
class DerivedFromLabel : Label
{
}

class DerivedFromTextCell : TextCell
{
}
}
Loading
Loading