Skip to content

Commit cef2113

Browse files
authored
Upgrade to .NET 8.0 (#102)
* Checkpoint * Skip impossible test for now... * Dockerfile too * Fix rebase issues. * A bit of clean up * Not sure * Apply suggestions from code review
1 parent fd9dd57 commit cef2113

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+176
-191
lines changed

.github/workflows/build-and-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
- '**.sln'
1212

1313
env:
14-
DOTNET_VERSION: '7.0.x' # SDK version
14+
DOTNET_VERSION: '8.0.x' # SDK version
1515

1616
jobs:
1717
build:
@@ -20,7 +20,7 @@ jobs:
2020

2121
steps:
2222
- uses: actions/checkout@main
23-
- name: Setup .NET Core
23+
- name: Setup .NET
2424
uses: actions/setup-dotnet@main
2525
with:
2626
dotnet-version: ${{ env.DOTNET_VERSION }}

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939

4040
steps:
4141
- name: Checkout repository
42-
uses: actions/checkout@v2
42+
uses: actions/checkout@main
4343

4444
# Initializes the CodeQL tools for scanning.
4545
- name: Initialize CodeQL
@@ -51,10 +51,10 @@ jobs:
5151
# Prefix the list here with "+" to use these queries and those in the config file.
5252
# queries: ./path/to/local/query, your-org/your-repo/queries@main
5353

54-
- name: Setup .NET 7.0
54+
- name: Setup .NET
5555
uses: actions/setup-dotnet@main
5656
with:
57-
dotnet-version: 7.0.x
57+
dotnet-version: 8.0.x
5858

5959
- name: Install dependencies
6060
run: dotnet restore

Directory.Packages.props

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<Project>
2+
<PropertyGroup>
3+
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
4+
</PropertyGroup>
5+
<ItemGroup>
6+
<PackageVersion Include="Bogus" Version="34.0.2" />
7+
<PackageVersion Include="CommandLineParser" Version="2.9.1" />
8+
<PackageVersion Include="GitHub.Actions.Core" Version="8.0.3" />
9+
<PackageVersion Include="MarkdownBuilder" Version="0.2.0" />
10+
<PackageVersion Include="Microsoft.Deployment.DotNet.Releases" Version="1.0.0" />
11+
<PackageVersion Include="Microsoft.Extensions.Caching.Abstractions" Version="8.0.0" />
12+
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="8.0.0" />
13+
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
14+
<PackageVersion Include="Microsoft.Extensions.FileSystemGlobbing" Version="8.0.0" />
15+
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.0" />
16+
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
17+
<PackageVersion Include="Microsoft.Extensions.Http" Version="8.0.0" />
18+
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
19+
<PackageVersion Include="Microsoft.Extensions.Logging" Version="8.0.0" />
20+
<PackageVersion Include="Octokit" Version="9.0.0" />
21+
<PackageVersion Include="System.Linq.Async" Version="6.0.1" />
22+
</ItemGroup>
23+
</Project>

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build-env
1+
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env
22

33
# Copy everything and restore
44
WORKDIR /app
@@ -16,6 +16,6 @@ LABEL com.github.actions.icon="alert-circle"
1616
LABEL com.github.actions.color="yellow"
1717

1818
# Build the runtime image
19-
FROM mcr.microsoft.com/dotnet/runtime:7.0
19+
FROM mcr.microsoft.com/dotnet/runtime:8.0
2020
COPY --from=build-env /app/out .
2121
ENTRYPOINT [ "dotnet", "/DotNet.VersionSweeper.dll" ]

dotnet-versionsweeper.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1616
.github\workflows\build-and-test.yml = .github\workflows\build-and-test.yml
1717
CODE-OF-CONDUCT.md = CODE-OF-CONDUCT.md
1818
.github\workflows\codeql-analysis.yml = .github\workflows\codeql-analysis.yml
19+
Directory.Packages.props = Directory.Packages.props
1920
Dockerfile = Dockerfile
2021
.github\workflows\dog-food.yml = .github\workflows\dog-food.yml
2122
dotnet-versionsweeper.json = dotnet-versionsweeper.json

src/DotNet.Extensions/DotNet.Extensions.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>net7.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
</PropertyGroup>

src/DotNet.Extensions/EnumerableExtensions.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4-
using System.Collections.Concurrent;
5-
64
namespace DotNet.Extensions;
75

86
// https://blogs.msdn.microsoft.com/pfxteam/2012/03/05/implementing-a-simple-foreachasync-part-2/

src/DotNet.Extensions/GlobalUsings.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33

44
global using System;
5+
global using System.Collections.Concurrent;
56
global using System.Collections.Generic;
67
global using System.Linq;
78
global using System.Text;

src/DotNet.GitHub/DotNet.GitHub.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="MarkdownBuilder" Version="0.2.0" />
11-
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="7.0.0" />
12-
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
13-
<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0" />
14-
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />
15-
<PackageReference Include="Octokit" Version="7.0.1" />
10+
<PackageReference Include="MarkdownBuilder" />
11+
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" />
12+
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
13+
<PackageReference Include="Microsoft.Extensions.Http" />
14+
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" />
15+
<PackageReference Include="Octokit" />
1616
</ItemGroup>
1717

1818
<ItemGroup>

src/DotNet.GitHub/GraphQLRequest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Licensed to the .NET Foundation under one or more agreements.
1+
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

44
namespace DotNet.GitHub;

0 commit comments

Comments
 (0)