Skip to content

Commit

Permalink
chore: Upgrade to .NET 8
Browse files Browse the repository at this point in the history
This commit:

- Adds a global.json file to declare the required SDK version
- Updates CI to install both .NET 6 and .NET 8
- Updates the test projects to test with both .NET 6 and .NET 8

Signed-off-by: Jon Skeet <[email protected]>
  • Loading branch information
jskeet committed Nov 15, 2023
1 parent 295c124 commit d8dc64c
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 8 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@ jobs:
with:
submodules: true

# Build with .NET 6.0 SDK
- name: Setup .NET 6.0
# Build with .NET 8.0 SDK
# Test with .NET 6.0 and 8.0
- name: Setup .NET 6.0 and 8.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
dotnet-version: |
8.0.x
6.0.x
- name: Build
run: |
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,14 @@ jobs:
with:
submodules: true

# Build with .NET 6.0 SDK
- name: Setup .NET 6.0
# Build with .NET 8.0 SDK
# Test with .NET 6.0 and 8.0
- name: Setup .NET 6.0 and 8.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
dotnet-version: |
8.0.x
6.0.x
- name: Build
run: |
Expand Down
7 changes: 7 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"sdk": {
"version": "8.0.100",
"allowPrerelease": false,
"rollForward": "latestMinor"
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
<Nullable>enable</Nullable>
</PropertyGroup>

Expand Down

0 comments on commit d8dc64c

Please sign in to comment.