Skip to content

Commit 9b5430b

Browse files
CopilotIeuanWalker
andauthored
Upgrade to .NET 10 (#13)
* Initial plan * Upgrade project to .NET 10 - update all target frameworks, package references, and GitHub Actions workflows Co-authored-by: IeuanWalker <6544051+IeuanWalker@users.noreply.github.com> * Update GitHub Actions to v4 to fix deprecated artifact actions Co-authored-by: IeuanWalker <6544051+IeuanWalker@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: IeuanWalker <6544051+IeuanWalker@users.noreply.github.com>
1 parent 6c3112e commit 9b5430b

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

.github/workflows/Release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
types: [published]
66

77
env:
8-
NET_VERSION: 9.*.*
8+
NET_VERSION: 10.*.*
99
PROJECT_PATH: 'Scr/IeuanWalker.Maui.StateButton.csproj'
1010
NUGET_PATH: './**/IeuanWalker.Maui.StateButton.${{ github.event.release.tag_name }}.nupkg'
1111

@@ -14,10 +14,10 @@ jobs:
1414
runs-on: windows-latest
1515

1616
steps:
17-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v4
1818

1919
- name: Setup .NET ${{ env.NET_VERSION }}
20-
uses: actions/setup-dotnet@v2
20+
uses: actions/setup-dotnet@v4
2121
with:
2222
dotnet-version: ${{ env.NET_VERSION }}
2323

@@ -30,7 +30,7 @@ jobs:
3030
- name: Build
3131
run: dotnet build ${{ env.PROJECT_PATH }} -c Release /p:Version=${{ github.event.release.tag_name }} --no-restore
3232

33-
- uses: actions/upload-artifact@v3
33+
- uses: actions/upload-artifact@v4
3434
with:
3535
name: NuGet
3636
path: ${{ env.NUGET_PATH }}

.github/workflows/build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
- cron: '0 0 1 */3 *' # Every 3 months
1010

1111
env:
12-
NET_VERSION: 9.*.*
12+
NET_VERSION: 10.*.*
1313
PROJECT_PATH: 'Scr/IeuanWalker.Maui.StateButton.csproj'
1414
NUGET_PATH: './**/IeuanWalker.Maui.StateButton.1.0.0.nupkg'
1515

@@ -18,10 +18,10 @@ jobs:
1818
runs-on: windows-latest
1919

2020
steps:
21-
- uses: actions/checkout@v3
21+
- uses: actions/checkout@v4
2222

2323
- name: Setup .NET ${{ env.NET_VERSION }}
24-
uses: actions/setup-dotnet@v2
24+
uses: actions/setup-dotnet@v4
2525
with:
2626
dotnet-version: ${{ env.NET_VERSION }}
2727

@@ -34,7 +34,7 @@ jobs:
3434
- name: Build
3535
run: dotnet build ${{ env.PROJECT_PATH }} -c Release --no-restore
3636

37-
- uses: actions/upload-artifact@v3
37+
- uses: actions/upload-artifact@v4
3838
with:
3939
name: NuGet
4040
path: ${{ env.NUGET_PATH }}

Demo/App.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net9.0-android;net9.0-ios;</TargetFrameworks>
3+
<TargetFrameworks>net10.0-android;net10.0-ios;</TargetFrameworks>
44
<OutputType>Exe</OutputType>
55
<RootNamespace>App</RootNamespace>
66
<UseMaui>true</UseMaui>
@@ -40,7 +40,7 @@
4040
<ItemGroup>
4141
<PackageReference Include="CommunityToolkit.Maui" Version="9.1.1" />
4242
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.3.2" />
43-
<PackageReference Include="Microsoft.Maui.Controls" Version="9.0.10" />
43+
<PackageReference Include="Microsoft.Maui.Controls" Version="10.0.10" />
4444
</ItemGroup>
4545
<ItemGroup>
4646
<ProjectReference Include="..\Scr\IeuanWalker.Maui.StateButton.csproj" />

Scr/IeuanWalker.Maui.StateButton.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net9.0;net9.0-android;net9.0-ios;</TargetFrameworks>
3+
<TargetFrameworks>net10.0;net10.0-android;net10.0-ios;</TargetFrameworks>
44
<UseMaui>true</UseMaui>
55
<SingleProject>true</SingleProject>
66
<ImplicitUsings>enable</ImplicitUsings>
@@ -48,11 +48,11 @@
4848
</Generator>
4949
</MauiXaml>
5050
</ItemGroup>
51-
<ItemGroup Condition="$(TargetFramework.StartsWith('net9.0-ios')) != true">
51+
<ItemGroup Condition="$(TargetFramework.StartsWith('net10.0-ios')) != true">
5252
<Compile Remove="**\**\*.ios.cs" />
5353
<None Include="**\**\*.ios.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
5454
</ItemGroup>
55-
<ItemGroup Condition="$(TargetFramework.StartsWith('MonoAndroid')) != true AND $(TargetFramework.StartsWith('net9.0-android')) != true">
55+
<ItemGroup Condition="$(TargetFramework.StartsWith('MonoAndroid')) != true AND $(TargetFramework.StartsWith('net10.0-android')) != true">
5656
<Compile Remove="**\**\*.android.cs" />
5757
<None Include="**\**\*.android.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
5858
</ItemGroup>
@@ -65,6 +65,6 @@
6565
<PrivateAssets>all</PrivateAssets>
6666
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
6767
</PackageReference>
68-
<PackageReference Include="Microsoft.Maui.Controls" Version="9.0.10" />
68+
<PackageReference Include="Microsoft.Maui.Controls" Version="10.0.10" />
6969
</ItemGroup>
7070
</Project>

0 commit comments

Comments
 (0)