Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to .NET 8 and C# 12 #6169

Merged
merged 11 commits into from Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Expand Up @@ -9,10 +9,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Install .NET 6.0.x
- name: Install .NET 8.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: "6.0.x"
dotnet-version: "8.0.x"

- name: Restore Tools
run: dotnet tool restore
Expand Down Expand Up @@ -69,10 +69,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Install .NET 6.0.x
- name: Install .NET 8.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: "6.0.x"
dotnet-version: "8.0.x"

- name: Setup Go
uses: actions/setup-go@v3
Expand Down Expand Up @@ -114,10 +114,10 @@ jobs:
distribution: microsoft
java-version: 11

- name: Install .NET 6.0.x
- name: Install .NET 8.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: "6.0.x"
dotnet-version: "8.0.x"

- name: Restore .NET workloads
run: dotnet workload install android
Expand All @@ -133,10 +133,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Install .NET 6.0.x
- name: Install .NET 8.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: "6.0.x"
dotnet-version: "8.0.x"

- name: Restore .NET workloads
# `dotnet workload restore` is bugged in .NET 7.0.101+ when restoring iOS projects,
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-nativelibs.yml
Expand Up @@ -46,10 +46,10 @@ jobs:
id: artifactsPath
run: echo "::set-output name=NUGET_ARTIFACTS::${{github.workspace}}/artifacts"

- name: Setup .NET 6.0.x
- name: Setup .NET 8.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: "6.0.x"
dotnet-version: "8.0.x"

- name: Build NativeLibs
run: dotnet pack -c Release osu.Framework.NativeLibs /p:Configuration=Release /p:Version=${{needs.check-if-tag.outputs.version}} /p:GenerateDocumentationFile=true -o ${{steps.artifactsPath.outputs.nuget_artifacts}}
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/deploy-pack.yml
Expand Up @@ -53,10 +53,10 @@ jobs:
id: artifactsPath
run: echo "::set-output name=NUGET_ARTIFACTS::${{github.workspace}}\artifacts"

- name: Install .NET 6.0.x
- name: Install .NET 8.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: "6.0.x"
dotnet-version: "8.0.x"

- name: Pack (Framework)
run: dotnet pack -c Release osu.Framework /p:Version=${{ github.ref_name }} /p:GenerateDocumentationFile=true /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg -o ${{steps.artifactsPath.outputs.nuget_artifacts}}
Expand Down Expand Up @@ -84,10 +84,10 @@ jobs:
id: artifactsPath
run: echo "::set-output name=NUGET_ARTIFACTS::${{github.workspace}}/artifacts"

- name: Install .NET 6.0.x
- name: Install .NET 8.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: "6.0.x"
dotnet-version: "8.0.x"

- name: Replace project references
run: osu.Framework.Templates/replace-references.sh ${{ github.ref_name }}
Expand Down Expand Up @@ -119,10 +119,10 @@ jobs:
id: artifactsPath
run: echo "::set-output name=NUGET_ARTIFACTS::${{github.workspace}}\artifacts"

- name: Install .NET 6.0.x
- name: Install .NET 8.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: "6.0.x"
dotnet-version: "8.0.x"

- name: Setup JDK 11
uses: actions/setup-java@v3
Expand Down Expand Up @@ -160,10 +160,10 @@ jobs:
id: artifactsPath
run: echo "::set-output name=NUGET_ARTIFACTS::${{github.workspace}}/artifacts"

- name: Install .NET 6.0.x
- name: Install .NET 8.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: "6.0.x"
dotnet-version: "8.0.x"

- name: Restore .NET Workloads
# `dotnet workload restore` is bugged in .NET 7.0.101+ when restoring iOS projects,
Expand Down
6 changes: 5 additions & 1 deletion Directory.Build.props
@@ -1,10 +1,14 @@
<!-- Contains required properties for osu!framework projects. -->
<Project>
<PropertyGroup Label="C#">
<LangVersion>10.0</LangVersion>
<LangVersion>12.0</LangVersion>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup Label="Documentation">
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);CS1591</NoWarn>
</PropertyGroup>
<ItemGroup Label="License">
<None Include="$(MSBuildThisFileDirectory)osu-framework.licenseheader">
<Link>osu-framework.licenseheader</Link>
Expand Down
2 changes: 1 addition & 1 deletion SampleGame.Android/AndroidManifest.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="SampleGame.Android" android:installLocation="auto">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="33" />
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="34" />
<application />
</manifest>
2 changes: 1 addition & 1 deletion SampleGame.Android/SampleGame.Android.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\osu.Framework.Android.props" />
<PropertyGroup>
<TargetFramework>net6.0-android</TargetFramework>
<TargetFramework>net8.0-android</TargetFramework>
<OutputType>Exe</OutputType>
<RootNamespace>SampleGame.Android</RootNamespace>
<AssemblyName>SampleGame.Android</AssemblyName>
Expand Down
2 changes: 1 addition & 1 deletion SampleGame.Desktop/SampleGame.Desktop.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup Label="Project">
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<OutputType>WinExe</OutputType>
</PropertyGroup>
<ItemGroup Label="Project References">
Expand Down
2 changes: 1 addition & 1 deletion SampleGame.iOS/SampleGame.iOS.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0-ios</TargetFramework>
<TargetFramework>net8.0-ios</TargetFramework>
<SupportedOSPlatformVersion>13.4</SupportedOSPlatformVersion>
</PropertyGroup>
<Import Project="..\osu.Framework.iOS.props" />
Expand Down
2 changes: 1 addition & 1 deletion SampleGame/SampleGame.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup Label="Project References">
<ProjectReference Include="..\osu.Framework\osu.Framework.csproj" />
Expand Down
7 changes: 0 additions & 7 deletions appveyor.yml

This file was deleted.

62 changes: 0 additions & 62 deletions appveyor_deploy.yml

This file was deleted.

7 changes: 0 additions & 7 deletions appveyor_native_deploy.yml

This file was deleted.

8 changes: 4 additions & 4 deletions global.json
@@ -1,7 +1,7 @@
{
"sdk": {
"version": "6.0.100",
"rollForward": "latestFeature"
"version": "8.0.100",
"rollForward": "latestFeature",
"allowPrerelease": false
}
}

}
2 changes: 1 addition & 1 deletion osu.Framework.Android/osu.Framework.Android.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup Label="Project">
<TargetFramework>net6.0-android</TargetFramework>
<TargetFramework>net8.0-android</TargetFramework>
<SupportedOSPlatformVersion>21.0</SupportedOSPlatformVersion>
<OutputType>Library</OutputType>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down
2 changes: 1 addition & 1 deletion osu.Framework.Benchmarks/osu.Framework.Benchmarks.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup Label="Project">
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<OutputType>Exe</OutputType>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion osu.Framework.NativeLibs/osu.Framework.NativeLibs.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup Label="Project">
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<OutputType>Library</OutputType>
<AssemblyTitle>osu!framework Libraries</AssemblyTitle>
<AssemblyName>osu.Framework.NativeLibs</AssemblyName>
Expand Down
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.0.1" PrivateAssets="all" />
Expand Down
2 changes: 1 addition & 1 deletion osu.Framework.Templates/osu.Framework.Templates.csproj
Expand Up @@ -5,7 +5,7 @@
<Title>osu! framework templates</Title>
<Description>Templates that can be used as starting points for new games, built with of osu! framework.</Description>
<PackageTags>dotnet-new;templates;osu;framework</PackageTags>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<IncludeContentInPack>true</IncludeContentInPack>
<IncludeBuildOutput>false</IncludeBuildOutput>
<ContentTargetFolders>content</ContentTargetFolders>
Expand Down
Expand Up @@ -3,4 +3,8 @@
<PropertyGroup>
<ApplicationManifest>$(MSBuildThisFileDirectory)app.manifest</ApplicationManifest>
</PropertyGroup>
<PropertyGroup Label="Documentation">
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);CS1591</NoWarn>
</PropertyGroup>
</Project>
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup Label="Project">
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<OutputType>WinExe</OutputType>
<AssemblyName>TemplateGame</AssemblyName>
<ApplicationIcon>game.ico</ApplicationIcon>
Expand Down
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup Label="Project">
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<GenerateProgramFile>false</GenerateProgramFile>
</PropertyGroup>
<ItemGroup Label="Project References">
Expand Down
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\TemplateGame.Resources\TemplateGame.Resources.csproj" />
Expand Down
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<EmbeddedResource Include="Fonts\**\*" />
Expand Down
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0-ios</TargetFramework>
<TargetFramework>net8.0-ios</TargetFramework>
<SupportedOSPlatformVersion>13.4</SupportedOSPlatformVersion>
<CodesignKey>iPhone Developer</CodesignKey>
<NullabilityInfoContextSupport>true</NullabilityInfoContextSupport>
Expand Down
Expand Up @@ -3,4 +3,8 @@
<PropertyGroup>
<ApplicationManifest>$(MSBuildThisFileDirectory)app.manifest</ApplicationManifest>
</PropertyGroup>
<PropertyGroup Label="Documentation">
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);CS1591</NoWarn>
</PropertyGroup>
</Project>
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup Label="Project">
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<OutputType>WinExe</OutputType>
<AssemblyName>FlappyDon</AssemblyName>
<ApplicationIcon>game.ico</ApplicationIcon>
Expand Down
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup Label="Project">
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<GenerateProgramFile>false</GenerateProgramFile>
</PropertyGroup>
<ItemGroup Label="Project References">
Expand Down
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\FlappyDon.Resources\FlappyDon.Resources.csproj" />
Expand Down