Skip to content

Commit 678cb22

Browse files
Merge pull request #384 from selfdocumentingcode/feature/upgrade-10
- Upgrade framework to .net 10 - Migrate solution file to slnx format - Upgrade TiktokenSharp and ImageSharp to latest minor - Upgrade DSharp to latest nightly - Remove obsolete source type for DynamicData test attr
2 parents d369087 + 2f570b9 commit 678cb22

14 files changed

Lines changed: 64 additions & 124 deletions

Directory.Build.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<Project>
22
<PropertyGroup>
3+
<TargetFramework>net10.0</TargetFramework>
34
<Nullable>enable</Nullable>
45
<GenerateDocumentationFile>true</GenerateDocumentationFile>
6+
<LangVersion>latest</LangVersion>
57
</PropertyGroup>
68

79
<ItemGroup>

Kattbot.sln

Lines changed: 0 additions & 79 deletions
This file was deleted.

Kattbot.slnx

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<Solution>
2+
<Configurations>
3+
<BuildType Name="Debug" />
4+
<BuildType Name="NoVariablesDefault" />
5+
<BuildType Name="Release" />
6+
</Configurations>
7+
<Folder Name="/src/">
8+
<Project Path="src/Kattbot.Common/Kattbot.Common.csproj">
9+
<BuildType Solution="NoVariablesDefault|*" Project="Release" />
10+
</Project>
11+
<Project Path="src/Kattbot.Data.Migrations/Kattbot.Data.Migrations.csproj">
12+
<BuildType Solution="NoVariablesDefault|*" Project="Release" />
13+
</Project>
14+
<Project Path="src/Kattbot.Data/Kattbot.Data.csproj">
15+
<BuildType Solution="NoVariablesDefault|*" Project="Release" />
16+
</Project>
17+
<Project Path="src/Kattbot/Kattbot.csproj">
18+
<BuildType Solution="NoVariablesDefault|*" Project="Release" />
19+
</Project>
20+
</Folder>
21+
<Folder Name="/tests/">
22+
<Project Path="tests/Kattbot.Tests/Kattbot.Tests.csproj">
23+
<BuildType Solution="NoVariablesDefault|*" Project="Release" />
24+
</Project>
25+
</Folder>
26+
<Project Path="docker/docker.dcproj">
27+
<BuildType Solution="NoVariablesDefault|*" Project="Release" />
28+
<Build />
29+
</Project>
30+
</Solution>

global.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "9.0.304",
3+
"version": "10.0.103",
44
"rollForward": "latestMinor"
55
}
6-
}
6+
}

src/Kattbot.Common/Kattbot.Common.csproj

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

3-
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
5-
</PropertyGroup>
6-
73
<ItemGroup>
84
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556">
95
<PrivateAssets>all</PrivateAssets>

src/Kattbot.Data.Migrations/Kattbot.Data.Migrations.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
54
<UserSecretsId>bc907d8f-4d2f-41fe-9b68-79e021dd3545</UserSecretsId>
65
</PropertyGroup>
76

@@ -18,15 +17,15 @@
1817
</ItemGroup>
1918

2019
<ItemGroup>
21-
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.9">
20+
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.3">
2221
<PrivateAssets>all</PrivateAssets>
2322
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2423
</PackageReference>
25-
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.9" />
26-
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="9.0.9" />
27-
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="9.0.9" />
28-
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="9.0.9" />
29-
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="9.0.4" />
24+
<PackageReference Include="Microsoft.Extensions.Configuration" Version="10.0.3" />
25+
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="10.0.3" />
26+
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="10.0.3" />
27+
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="10.0.3" />
28+
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="10.0.0" />
3029
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556">
3130
<PrivateAssets>all</PrivateAssets>
3231
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

src/Kattbot.Data/Kattbot.Data.csproj

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

3-
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
5-
</PropertyGroup>
6-
73
<ItemGroup>
8-
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="9.0.4" />
4+
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="10.0.0" />
95
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556">
106
<PrivateAssets>all</PrivateAssets>
117
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

src/Kattbot/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
FROM mcr.microsoft.com/dotnet/runtime:9.0 AS base
1+
FROM mcr.microsoft.com/dotnet/runtime:10.0 AS base
22

3-
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
3+
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
44
ARG BUILD_CONFIGURATION=Debug
55
WORKDIR /src
66
COPY ["Directory.Build.props", "."]
77
COPY ["src/Kattbot/Kattbot.csproj", "Kattbot/"]
88
COPY ["src/Kattbot.Common/Kattbot.Common.csproj", "Kattbot.Common/"]
99
COPY ["src/Kattbot.Data/Kattbot.Data.csproj", "Kattbot.Data/"]
1010
RUN dotnet restore "./Kattbot/Kattbot.csproj"
11-
COPY ["Kattbot.sln", "."]
11+
COPY ["Kattbot.slnx", "."]
1212
COPY ["stylecop.json", "."]
1313
COPY [".editorconfig", "."]
1414
COPY src .

src/Kattbot/Kattbot.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
54
<UserSecretsId>dotnet-Kattbot-79CAD254-2C56-430B-8B4B-16AA8DA8808D</UserSecretsId>
65
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
76
</PropertyGroup>
@@ -18,17 +17,17 @@
1817
</PropertyGroup>
1918

2019
<ItemGroup>
21-
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="9.0.9" />
22-
<PackageReference Include="TiktokenSharp" Version="1.1.8" />
20+
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="10.0.3" />
21+
<PackageReference Include="TiktokenSharp" Version="1.2.0" />
2322
<PackageReference Include="CommandLineArgumentsParser" Version="3.0.23" />
24-
<PackageReference Include="DSharpPlus" Version="5.0.0-nightly-02542" />
25-
<PackageReference Include="DSharpPlus.CommandsNext" Version="5.0.0-nightly-02542" />
26-
<PackageReference Include="DSharpPlus.Interactivity" Version="5.0.0-nightly-02542" />
23+
<PackageReference Include="DSharpPlus" Version="5.0.0-nightly-02572" />
24+
<PackageReference Include="DSharpPlus.CommandsNext" Version="5.0.0-nightly-02572" />
25+
<PackageReference Include="DSharpPlus.Interactivity" Version="5.0.0-nightly-02572" />
2726
<PackageReference Include="MediatR" Version="[12.5.0, 13)" />
28-
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.9" />
29-
<PackageReference Include="Microsoft.Extensions.Http" Version="9.0.9" />
30-
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="9.0.4" />
31-
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.11" />
27+
<PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.3" />
28+
<PackageReference Include="Microsoft.Extensions.Http" Version="10.0.3" />
29+
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="10.0.0" />
30+
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.12" />
3231
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="2.1.7" />
3332
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556">
3433
<PrivateAssets>all</PrivateAssets>

src/Kattbot/prod.Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
1+
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
22
ARG BUILD_CONFIGURATION=Release
33
WORKDIR /src
44
COPY ["Directory.Build.props", "."]
@@ -10,7 +10,7 @@ COPY [".config/dotnet-tools.json", ".config/"]
1010
RUN dotnet restore "./Kattbot/Kattbot.csproj"
1111
RUN dotnet restore "./Kattbot.Data.Migrations/Kattbot.Data.Migrations.csproj"
1212
RUN dotnet tool restore
13-
COPY ["Kattbot.sln", "."]
13+
COPY ["Kattbot.slnx", "."]
1414
COPY ["stylecop.json", "."]
1515
COPY [".editorconfig", "."]
1616
COPY ["scripts/kattbot-backup-db.sh", "."]
@@ -27,7 +27,7 @@ ARG BUILD_CONFIGURATION=Release
2727
RUN dotnet ef migrations script --no-build --configuration $BUILD_CONFIGURATION --idempotent -p Kattbot.Data.Migrations -o /output/migrations/database_migration.sql
2828
COPY --from=build /src/kattbot-backup-db.sh /output/migrations/
2929

30-
FROM mcr.microsoft.com/dotnet/runtime:9.0 AS final
30+
FROM mcr.microsoft.com/dotnet/runtime:10.0 AS final
3131
WORKDIR /app
3232
COPY --from=publish /output/publish .
3333
COPY --from=migrations /output/migrations ./migrations/

0 commit comments

Comments
 (0)