Skip to content

Commit 4935a39

Browse files
authored
Update to .NET 8 (#76)
* Update sample to .NET 8 * Update ci-sample.yml * Update ci-sample.yml * Update all to net7 * All to net8 * Fix build warnings
1 parent 215c5f6 commit 4935a39

File tree

5 files changed

+18
-37
lines changed

5 files changed

+18
-37
lines changed

.github/workflows/ci-sample.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,9 @@ jobs:
1515

1616
steps:
1717
- uses: actions/checkout@v3
18-
- name: Setup .NET
19-
uses: actions/setup-dotnet@v2
20-
with:
21-
dotnet-version: 7.0.x
22-
- name: Install .NET MAUI
23-
run: dotnet workload install maui
24-
- uses: actions/setup-java@v3
25-
with:
26-
distribution: 'microsoft'
27-
java-version: '11'
18+
2819
- name: Restore dependencies
2920
run: dotnet restore samples\Plugin.Maui.Audio.Sample\Plugin.Maui.Audio.Sample.csproj
21+
3022
- name: Build
3123
run: dotnet build samples\Plugin.Maui.Audio.Sample\Plugin.Maui.Audio.Sample.csproj -c Release

.github/workflows/ci.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,9 @@ jobs:
1515

1616
steps:
1717
- uses: actions/checkout@v3
18-
- name: Setup .NET
19-
uses: actions/setup-dotnet@v2
20-
with:
21-
dotnet-version: 6.0.x
22-
- name: Install .NET MAUI
23-
run: dotnet workload install maui
24-
- uses: actions/setup-java@v3
25-
with:
26-
distribution: 'microsoft'
27-
java-version: '11'
18+
2819
- name: Restore dependencies
2920
run: dotnet restore src\Plugin.Maui.Audio\Plugin.Maui.Audio.csproj
21+
3022
- name: Build
3123
run: dotnet build src\Plugin.Maui.Audio\Plugin.Maui.Audio.csproj -c Release

.github/workflows/release-nuget.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,20 @@ jobs:
1616
run: |
1717
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
1818
git branch --remote --contains | grep origin/main
19-
- name: Setup .NET
20-
uses: actions/setup-dotnet@v2
21-
with:
22-
dotnet-version: 6.0.x
23-
- name: Install .NET MAUI
24-
run: dotnet workload install maui
25-
- uses: actions/setup-java@v3
26-
with:
27-
distribution: 'microsoft'
28-
java-version: '11'
19+
2920
- name: Get version information from tag
3021
id: get_version
3122
uses: battila7/get-version-action@v2
23+
3224
- name: Restore dependencies
3325
run: dotnet restore src\Plugin.Maui.Audio.sln
26+
3427
- name: Build
3528
run: dotnet build src\Plugin.Maui.Audio\Plugin.Maui.Audio.csproj -c Release /p:Version=${{ steps.get_version.outputs.version-without-v }}
29+
3630
- name: Pack
3731
run: dotnet pack src\Plugin.Maui.Audio\Plugin.Maui.Audio.csproj -c Release /p:Version=${{ steps.get_version.outputs.version-without-v }} --no-build --output .
32+
3833
- name: Push
3934
run: dotnet nuget push Plugin.Maui.Audio.${{ steps.get_version.outputs.version-without-v }}.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}
4035
env:

samples/Plugin.Maui.Audio.Sample/Plugin.Maui.Audio.Sample.csproj

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

33
<PropertyGroup>
4-
<TargetFrameworks>net7.0-android;net7.0-ios;net7.0-maccatalyst</TargetFrameworks>
5-
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net7.0-windows10.0.19041.0</TargetFrameworks>
4+
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
5+
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.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);net8.0-tizen</TargetFrameworks> -->
88
<OutputType>Exe</OutputType>
99
<RootNamespace>Plugin.Maui.Audio.Sample</RootNamespace>
1010
<UseMaui>true</UseMaui>
@@ -49,6 +49,7 @@
4949
</ItemGroup>
5050

5151
<ItemGroup>
52-
<PackageReference Include="SkiaSharp.Extended.UI.Maui" Version="2.0.0-preview.59" />
52+
<PackageReference Include="SkiaSharp.Extended.UI.Maui" Version="2.0.0-preview.86" />
53+
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
5354
</ItemGroup>
5455
</Project>

src/Plugin.Maui.Audio/Plugin.Maui.Audio.csproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst;net6.0</TargetFrameworks>
4-
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
3+
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst;net8.0</TargetFrameworks>
4+
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
55
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
6-
<!-- <TargetFrameworks>$(TargetFrameworks);net6.0-tizen</TargetFrameworks> -->
6+
<!-- <TargetFrameworks>$(TargetFrameworks);net8.0-tizen</TargetFrameworks> -->
77
<UseMaui>true</UseMaui>
88
<SingleProject>true</SingleProject>
99
<ImplicitUsings>enable</ImplicitUsings>
@@ -70,6 +70,7 @@
7070

7171
<ItemGroup>
7272
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="all" IsImplicitlyDefined="true" />
73+
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
7374
</ItemGroup>
7475

7576
<!-- Package additions -->

0 commit comments

Comments
 (0)