Skip to content

Commit afa3618

Browse files
committed
Add .NET 10 support
1 parent 1792c13 commit afa3618

36 files changed

Lines changed: 94 additions & 77 deletions

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- name: Setup .NET
3232
uses: actions/setup-dotnet@v4
3333
with:
34-
dotnet-version: 8.0.x
34+
dotnet-version: 10.0.x
3535

3636
- name: Restore workloads
3737
run: dotnet workload restore
@@ -67,7 +67,7 @@ jobs:
6767
name: nuget
6868
path: ${{ env.NuGetDirectory }}
6969

70-
- name: Setup .NET Core
70+
- name: Setup .NET
7171
uses: actions/setup-dotnet@v4
7272

7373
- name: Publish NuGet package

samples/Foo.Bar.SampleApp.Hybrid/Foo.Bar.SampleApp.Hybrid.csproj

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Razor">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net8.0-android;net8.0-ios</TargetFrameworks>
4+
<TargetFrameworks>net9.0-android;net9.0-ios</TargetFrameworks>
55

66
<OutputType>Exe</OutputType>
77
<RootNamespace>Foo.Bar.SampleApp.Hybrid</RootNamespace>
@@ -20,11 +20,20 @@
2020
<!-- Versions -->
2121
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
2222
<ApplicationVersion>1</ApplicationVersion>
23-
24-
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
25-
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">24.0</SupportedOSPlatformVersion>
23+
24+
<CheckEolWorkloads>false</CheckEolWorkloads>
2625
</PropertyGroup>
2726

27+
<PropertyGroup Condition="'$(TargetFramework)' == 'net9.0-ios'">
28+
<TargetPlatformVersion>18.0</TargetPlatformVersion>
29+
<SupportedOSPlatformVersion>14.2</SupportedOSPlatformVersion>
30+
</PropertyGroup>
31+
32+
<PropertyGroup Condition="'$(TargetFramework)' == 'net9.0-android'">
33+
<TargetPlatformVersion>35.0</TargetPlatformVersion>
34+
<SupportedOSPlatformVersion>35.0</SupportedOSPlatformVersion>
35+
</PropertyGroup>
36+
2837
<ItemGroup>
2938
<!-- App Icon -->
3039
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />
@@ -44,9 +53,9 @@
4453
</ItemGroup>
4554

4655
<ItemGroup>
47-
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.100" />
48-
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="8.0.100" />
49-
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="8.0.100" />
56+
<PackageReference Include="Microsoft.Maui.Controls" Version="9.0.30" />
57+
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="9.0.30" />
58+
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="9.0.30" />
5059
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.1" />
5160
</ItemGroup>
5261

File renamed without changes.

samples/Foo.Bar.SampleApp.Net8/AppShell.xaml renamed to samples/Foo.Bar.SampleApp.Net10/AppShell.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
Title="Foo.Bar.SampleApp">
99

1010
<ShellContent
11-
Title="NET8"
11+
Title="NET10"
1212
ContentTemplate="{DataTemplate local:MainPage}"
1313
Route="MainPage" />
1414

File renamed without changes.

samples/Foo.Bar.SampleApp.Net8/Foo.Bar.SampleApp.Net8.csproj renamed to samples/Foo.Bar.SampleApp.Net10/Foo.Bar.SampleApp.Net10.csproj

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net8.0-android;net8.0-ios</TargetFrameworks>
4+
<TargetFrameworks>net10.0-android;net10.0-ios</TargetFrameworks>
55
<OutputType>Exe</OutputType>
6-
<RootNamespace>Foo.Bar.SampleApp.Net8</RootNamespace>
6+
<RootNamespace>Foo.Bar.SampleApp.Net10</RootNamespace>
77
<UseMaui>true</UseMaui>
88
<SingleProject>true</SingleProject>
99
<ImplicitUsings>enable</ImplicitUsings>
1010
<Nullable>enable</Nullable>
1111

1212
<!-- Display name -->
13-
<ApplicationTitle>Foo.Bar.SampleApp.Net8</ApplicationTitle>
13+
<ApplicationTitle>Foo.Bar.SampleApp.Net10</ApplicationTitle>
1414

1515
<!-- App Identifier -->
16-
<ApplicationId>com.companyname.foo.bar.sampleapp.net8</ApplicationId>
16+
<ApplicationId>com.companyname.foo.bar.sampleapp.net10</ApplicationId>
1717

1818
<!-- Versions -->
1919
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
2020
<ApplicationVersion>1</ApplicationVersion>
2121

22-
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">11.0</SupportedOSPlatformVersion>
22+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">12.2</SupportedOSPlatformVersion>
2323
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
2424
</PropertyGroup>
2525

@@ -42,9 +42,9 @@
4242
</ItemGroup>
4343

4444
<ItemGroup>
45-
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.100" />
46-
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="8.0.100" />
47-
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.1" />
45+
<PackageReference Include="Microsoft.Maui.Controls" Version="10.0.30" />
46+
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="10.0.30" />
47+
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="10.0.2" />
4848
</ItemGroup>
4949

5050
<ItemGroup>
@@ -59,7 +59,7 @@
5959
<Generator>MSBuild:Compile</Generator>
6060
</MauiXaml>
6161
</ItemGroup>
62-
62+
6363
<Target Name="LinkWithSwift" DependsOnTargets="_ParseBundlerArguments;_DetectSdkLocations" BeforeTargets="_LinkNativeExecutable">
6464
<PropertyGroup>
6565
<_SwiftPlatform Condition="$(RuntimeIdentifier.StartsWith('iossimulator-'))">iphonesimulator</_SwiftPlatform>

samples/Foo.Bar.SampleApp.Net8/MainPage.xaml renamed to samples/Foo.Bar.SampleApp.Net10/MainPage.xaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
Clicked="OnCreateInterstitialClicked"
6565
HorizontalOptions="Fill" />
6666
</Grid>
67-
67+
6868
<Label Padding="16,0" Text="Native:" />
6969

7070
<admob:NativeAdView Margin="16,0"
@@ -83,7 +83,7 @@
8383
</Grid.ColumnDefinitions>
8484
<Grid.RowDefinitions>
8585
<RowDefinition Height="*" />
86-
<RowDefinition Height="*" />
86+
<RowDefinition Height="*" />
8787
</Grid.RowDefinitions>
8888
<Border WidthRequest="200" HeightRequest="200" HorizontalOptions="Start" StrokeThickness="8" Stroke="Purple" Grid.RowSpan="2" Grid.ColumnSpan="2">
8989
<Border.StrokeShape>
@@ -167,7 +167,7 @@
167167
SemanticProperties.Hint="Shows a test rewarded interstitial ad"
168168
Clicked="OnCreateRewardedInterstitialClicked"
169169
HorizontalOptions="Fill" />
170-
</Grid>
170+
</Grid>
171171

172172
<Label Padding="16,0" Text="App Open:" />
173173
<Grid Padding="16, 0" ColumnSpacing="8">
File renamed without changes.

samples/Foo.Bar.SampleApp.Net8/MauiProgram.cs renamed to samples/Foo.Bar.SampleApp.Net10/MauiProgram.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public static MauiApp CreateMauiApp()
1919
{
2020
Geography = ConsentDebugGeography.Eea,
2121
TestDeviceHashedIds = ["33BE2250B43518CCDA7DE426D04EE231"],
22-
Reset = true
22+
//Reset = true
2323
})
2424
.ConfigureFonts(fonts =>
2525
{

0 commit comments

Comments
 (0)