Skip to content

Commit 52a9e27

Browse files
authored
chore: update solution to .NET 10 (#24)
• Update all projects in the solution to .NET 10 • Update the Dockerfile to use .NET 10 • Update CI/CD to use .NET 10 • Update the README to recommend using the latest version of Visual Studio and .NET 10 • Update all NuGet dependencies
1 parent 7a2f377 commit 52a9e27

File tree

9 files changed

+31
-31
lines changed

9 files changed

+31
-31
lines changed

.github/workflows/dotnet.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Setup .NET
2020
uses: actions/setup-dotnet@v4
2121
with:
22-
dotnet-version: 9.0.x
22+
dotnet-version: 10.0.x
2323
- name: Restore dependencies
2424
run: dotnet restore
2525
- name: Build

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2024 Ashton Abdiukov
3+
Copyright (c) 2024-2026 Ashton Abdiukov
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,17 +80,17 @@ curl -X 'POST' \
8080
### Option 2: Using Visual Studio (recommended for development purposes)
8181

8282
#### Requirements
83-
- Visual Studio 2022
83+
- Visual Studio 2026
8484
- With ASP.NET and web development installed from the Visual Studio Installer
85-
- .NET 9 SDK
85+
- .NET 10 SDK
8686

8787
#### How to Run
88-
1. Open the solution in Visual Studio 2022.
88+
1. Open the solution in Visual Studio 2026.
8989
2. Build and launch the Captcha.WebApi project.
9090
3. The API can be accessed at [https://localhost:5280](https://localhost:5280).
9191

9292
#### How to Test
93-
1. Open the solution in Visual Studio 2022.
93+
1. Open the solution in Visual Studio 2026.
9494
2. Run the tests in Test Explorer.
9595

9696
## Acknowledgments

src/Captcha.Core/Captcha.Core.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
<RootNamespace>Captcha.Core</RootNamespace>
@@ -13,8 +13,8 @@
1313
</ItemGroup>
1414

1515
<ItemGroup>
16-
<PackageReference Include="SkiaSharp" Version="3.119.0" />
17-
<PackageReference Include="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="3.119.0" />
16+
<PackageReference Include="SkiaSharp" Version="3.119.1" />
17+
<PackageReference Include="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="3.119.1" />
1818
</ItemGroup>
1919

2020
<ItemGroup>

src/Captcha.WebApi/Captcha.WebApi.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
@@ -10,12 +10,12 @@
1010

1111
<ItemGroup>
1212
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.22.1" />
13-
<PackageReference Include="Swashbuckle.AspNetCore" Version="9.0.4" />
14-
<PackageReference Include="Swashbuckle.AspNetCore.Filters" Version="9.0.0" />
15-
<PackageReference Include="OpenTelemetry.Exporter.Console" Version="1.12.0" />
16-
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.12.0" />
17-
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.12.0" />
18-
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.12.0" />
13+
<PackageReference Include="Swashbuckle.AspNetCore" Version="10.1.0" />
14+
<PackageReference Include="Swashbuckle.AspNetCore.Filters" Version="10.0.1" />
15+
<PackageReference Include="OpenTelemetry.Exporter.Console" Version="1.14.0" />
16+
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.14.0" />
17+
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.14.0" />
18+
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.14.0" />
1919
</ItemGroup>
2020

2121
<ItemGroup>

src/Captcha.WebApi/Dependency/ServiceRegistrations.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ namespace Captcha.WebApi.Dependency;
33
using Captcha.Core.Mappers;
44
using Captcha.Core.Services;
55
using Controllers.Examples;
6-
using Microsoft.OpenApi.Models;
6+
using Microsoft.OpenApi;
77
using OpenTelemetry.Resources;
88
using OpenTelemetry.Trace;
99
using Swashbuckle.AspNetCore.Filters;

src/Captcha.WebApi/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
22

33
# This stage is used when running from VS in fast mode (Default for Debug configuration)
4-
FROM mcr.microsoft.com/dotnet/aspnet:9.0-noble AS base
5-
4+
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS base
65
USER $APP_UID
76
WORKDIR /app
87
EXPOSE 8080
98
EXPOSE 8081
109

10+
1111
# This stage is used to build the service project
12-
FROM mcr.microsoft.com/dotnet/sdk:9.0-noble AS build
12+
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
1313
ARG BUILD_CONFIGURATION=Release
1414
WORKDIR /src
1515
COPY ["src/Captcha.WebApi/Captcha.WebApi.csproj", "src/Captcha.WebApi/"]
@@ -28,4 +28,4 @@ RUN dotnet publish "./Captcha.WebApi.csproj" -c $BUILD_CONFIGURATION -o /app/pub
2828
FROM base AS final
2929
WORKDIR /app
3030
COPY --from=publish /app/publish .
31-
ENTRYPOINT ["dotnet", "Captcha.WebApi.dll"]
31+
ENTRYPOINT ["dotnet", "Captcha.WebApi.dll"]

tests/Captcha.FunctionalTests/Captcha.FunctionalTests.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
@@ -14,13 +14,13 @@
1414
<PrivateAssets>all</PrivateAssets>
1515
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1616
</PackageReference>
17-
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.9" />
18-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
17+
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.0.1" />
18+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
1919
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.22.1" />
20-
<PackageReference Include="Reqnroll.NUnit" Version="3.0.2" />
21-
<PackageReference Include="RestSharp" Version="112.1.0" />
20+
<PackageReference Include="Reqnroll.NUnit" Version="3.3.0" />
21+
<PackageReference Include="RestSharp" Version="113.0.0" />
2222
<PackageReference Include="nunit" Version="4.4.0" />
23-
<PackageReference Include="NUnit3TestAdapter" Version="5.1.0" />
23+
<PackageReference Include="NUnit3TestAdapter" Version="6.0.1" />
2424
</ItemGroup>
2525

2626
<ItemGroup>

tests/Captcha.UnitTests/Captcha.UnitTests.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
<IsPackable>false</IsPackable>
@@ -10,10 +10,10 @@
1010
</PropertyGroup>
1111

1212
<ItemGroup>
13-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
13+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
1414
<PackageReference Include="NUnit" Version="4.4.0" />
15-
<PackageReference Include="NUnit3TestAdapter" Version="5.1.0" />
16-
<PackageReference Include="NUnit.Analyzers" Version="4.10.0">
15+
<PackageReference Include="NUnit3TestAdapter" Version="6.0.1" />
16+
<PackageReference Include="NUnit.Analyzers" Version="4.11.2">
1717
<PrivateAssets>all</PrivateAssets>
1818
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1919
</PackageReference>

0 commit comments

Comments
 (0)