Skip to content

Commit 51e1045

Browse files
authored
Upgraded to .NET 9 (#67)
1 parent 3667b0b commit 51e1045

22 files changed

Lines changed: 122 additions & 106 deletions

File tree

GitVersion.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
next-version: 8.0.0
1+
next-version: 9.0.0

azure-pipelines.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ trigger:
55

66
variables:
77
BuildConfiguration: Release
8-
DotNetCoreVersionPreviousPrevious: 6.x
9-
DotNetCoreVersionPrevious: 7.x
10-
DotNetCoreVersionLatest: 8.x
8+
DotNetCoreVersionPrevious: 8.x
9+
DotNetCoreVersionLatest: 9.x
1110

1211
parameters:
1312
- name: publishPackages
@@ -27,12 +26,6 @@ stages:
2726
persistCredentials: 'true'
2827
clean: true
2928
# Install the desired .NET SDK.
30-
- task: UseDotNet@2
31-
displayName: 'Acquire .NET $(DotNetCoreVersionPreviousPrevious) SDK'
32-
inputs:
33-
packageType: 'sdk'
34-
version: $(DotNetCoreVersionPreviousPrevious)
35-
includePreviewVersions: false
3629
- task: UseDotNet@2
3730
displayName: 'Acquire .NET $(DotNetCoreVersionPrevious) SDK'
3831
inputs:

samples/BlazorApp1/BlazorApp1.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55
<IsPackable>false</IsPackable>
66
</PropertyGroup>
77

88
<ItemGroup>
99
<PackageReference Include="JetBrains.Annotations" Version="2024.3.0" />
10-
<PackageReference Include="Microsoft.AspNetCore.Components.Forms" Version="8.0.10" />
11-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.10" />
12-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.10" PrivateAssets="all" />
10+
<PackageReference Include="Microsoft.AspNetCore.Components.Forms" Version="9.0.0" />
11+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.0" />
12+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="9.0.0" PrivateAssets="all" />
1313
<PackageReference Include="Serilog" Version="4.1.0" />
1414
<PackageReference Include="Serilog.Extensions.Logging" Version="8.0.0" />
1515
<PackageReference Include="Serilog.Sinks.BrowserConsole" Version="8.0.0" />

samples/BlazorApp2/BlazorApp2.Client/BlazorApp2.Client.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55
<IsPackable>false</IsPackable>
66
<NoDefaultLaunchSettingsFile>true</NoDefaultLaunchSettingsFile>
77
<StaticWebAssetProjectMode>Default</StaticWebAssetProjectMode>
88
</PropertyGroup>
99

1010
<ItemGroup>
1111
<PackageReference Include="JetBrains.Annotations" Version="2024.3.0" />
12-
<PackageReference Include="Microsoft.AspNetCore.Components.Forms" Version="8.0.10" />
13-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.10" />
12+
<PackageReference Include="Microsoft.AspNetCore.Components.Forms" Version="9.0.0" />
13+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.0" />
1414
<PackageReference Include="Serilog" Version="4.1.0" />
1515
<PackageReference Include="Serilog.Extensions.Logging" Version="8.0.0" />
1616
<PackageReference Include="Serilog.Sinks.BrowserConsole" Version="8.0.0" />

samples/BlazorApp2/BlazorApp2/BlazorApp2.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55
<IsPackable>false</IsPackable>
66
</PropertyGroup>
77

88
<ItemGroup>
99
<PackageReference Include="JetBrains.Annotations" Version="2024.3.0" />
10-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.10" />
10+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="9.0.0" />
1111
</ItemGroup>
1212

1313
<ItemGroup>

samples/ConsoleApp1/ConsoleApp1.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55
<OutputType>Exe</OutputType>
66
<IsPackable>false</IsPackable>
77
</PropertyGroup>

samples/MauiApp1/MauiApp1.csproj

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

33
<PropertyGroup>
4-
<TargetFrameworks>net8.0-android;net8.0-ios</TargetFrameworks>
5-
<!--<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>-->
4+
<TargetFrameworks>net9.0-android;net9.0-ios</TargetFrameworks>
5+
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net9.0-windows10.0.19041.0</TargetFrameworks>
66
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
7-
<!-- <TargetFrameworks>$(TargetFrameworks);net7.0-tizen</TargetFrameworks> -->
7+
<!-- <TargetFrameworks>$(TargetFrameworks);net9.0-tizen</TargetFrameworks> -->
88

99
<!-- Note for MacCatalyst:
1010
The default runtime is maccatalyst-x64, except in Release config, in which case the default is maccatalyst-x64;maccatalyst-arm64.
@@ -18,6 +18,7 @@
1818
<UseMaui>true</UseMaui>
1919
<SingleProject>true</SingleProject>
2020
<ImplicitUsings>enable</ImplicitUsings>
21+
<Nullable>enable</Nullable>
2122

2223
<!-- Display name -->
2324
<ApplicationTitle>MauiApp1</ApplicationTitle>
@@ -29,12 +30,15 @@
2930
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
3031
<ApplicationVersion>1</ApplicationVersion>
3132

32-
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">11.0</SupportedOSPlatformVersion>
33-
<!--<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">13.1</SupportedOSPlatformVersion>-->
33+
<!-- To develop, package, and publish an app to the Microsoft Store, see: https://aka.ms/MauiTemplateUnpackaged -->
34+
<WindowsPackageType>None</WindowsPackageType>
35+
36+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">15.0</SupportedOSPlatformVersion>
37+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">15.0</SupportedOSPlatformVersion>
3438
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
3539
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
36-
<!--<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>-->
37-
<!--<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>-->
40+
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
41+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
3842
</PropertyGroup>
3943

4044
<ItemGroup>
@@ -56,15 +60,15 @@
5660
</ItemGroup>
5761

5862
<ItemGroup>
59-
<PackageReference Include="CommunityToolkit.Maui" Version="9.1.0" />
60-
<PackageReference Include="CommunityToolkit.Maui.Core" Version="9.1.0" />
61-
<PackageReference Include="CommunityToolkit.Maui.Maps" Version="2.0.3" />
63+
<PackageReference Include="CommunityToolkit.Maui" Version="9.1.1" />
64+
<PackageReference Include="CommunityToolkit.Maui.Core" Version="9.1.1" />
65+
<PackageReference Include="CommunityToolkit.Maui.Maps" Version="2.0.4" />
6266
<PackageReference Include="CommunityToolkit.Maui.Markup" Version="4.2.0" />
6367
<PackageReference Include="CommunityToolkit.Maui.MediaElement" Version="4.1.2" />
6468
<PackageReference Include="JetBrains.Annotations" Version="2024.3.0" />
65-
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.92" />
66-
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="8.0.92" />
67-
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.1" />
69+
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
70+
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="9.0.0" />
71+
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.0" />
6872
</ItemGroup>
6973

7074
<ItemGroup>

samples/TestProject1/TestProject1.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55
<IsPackable>false</IsPackable>
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<PackageReference Include="FluentAssertions" Version="6.12.1" />
9+
<PackageReference Include="FluentAssertions" Version="6.12.2" />
1010
<PackageReference Include="JetBrains.Annotations" Version="2024.3.0" />
1111
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
1212
<PackageReference Include="NUnit" Version="4.2.2" />
1313
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
14-
<PackageReference Include="NUnit.Analyzers" Version="4.3.0">
14+
<PackageReference Include="NUnit.Analyzers" Version="4.4.0">
1515
<PrivateAssets>all</PrivateAssets>
1616
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1717
</PackageReference>

samples/WebApplication1/Properties/launchSettings.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"commandName": "Project",
66
"dotnetRunMessages": true,
77
"launchBrowser": false,
8-
"launchUrl": "weatherforecast",
98
"applicationUrl": "https://localhost:7001;http://localhost:7000",
109
"environmentVariables": {
1110
"ASPNETCORE_ENVIRONMENT": "Development"

samples/WebApplication1/WebApplication1.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55
<IsPackable>false</IsPackable>
66
</PropertyGroup>
77

88
<ItemGroup>
99
<PackageReference Include="JetBrains.Annotations" Version="2024.3.0" />
10-
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="8.0.1" />
11-
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.9.0" />
10+
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="9.0.0" />
11+
<PackageReference Include="Swashbuckle.AspNetCore" Version="7.0.0" />
1212
</ItemGroup>
1313

1414
<ItemGroup>

0 commit comments

Comments
 (0)