Skip to content

Commit d378b7b

Browse files
committed
Upgrade to .NET 10
1 parent c47e3c2 commit d378b7b

File tree

6 files changed

+14
-15
lines changed

6 files changed

+14
-15
lines changed

App/Api/Setup/ApiEndpoints.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
using System.Globalization;
22
using Asp.Versioning;
3-
using Microsoft.OpenApi.Any;
43
using Services;
54

65
namespace Api.Setup;
76

87
internal static class ApiEndpoints
98
{
10-
private static readonly OpenApiString ExampleFromDate = new(DateTime.Now.AddMonths(-1).ToString("yyyy-MM-dd", CultureInfo.InvariantCulture));
11-
private static readonly OpenApiString ExampleToDate = new(DateTime.Now.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture));
9+
// private static readonly string ExampleFromDate = DateTime.Now.AddMonths(-1).ToString("yyyy-MM-dd", CultureInfo.InvariantCulture);
10+
// private static readonly string ExampleToDate = DateTime.Now.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture);
1211

1312
public static void ConfigureEndpoints(this WebApplication app)
1413
{
@@ -93,8 +92,8 @@ private static void ConfigureEndpoint(RouteGroupBuilder group, string route, str
9392
.WithOpenApi(operation =>
9493
{
9594
operation.Summary = summary;
96-
operation.Parameters[0].Example = ExampleFromDate;
97-
operation.Parameters[^1].Example = ExampleToDate;
95+
// operation.Parameters[0].Example = ExampleFromDate;
96+
// operation.Parameters[^1].Example = ExampleToDate;
9897
return operation;
9998
});
10099
}

App/Directory.Packages.props

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
</PropertyGroup>
66
<ItemGroup>
77
<PackageVersion Include="Asp.Versioning.Mvc.ApiExplorer" Version="8.1.0" />
8-
<PackageVersion Include="Microsoft.AspNetCore.OpenApi" Version="9.0.4" />
9-
<PackageVersion Include="Microsoft.AspNetCore.WebUtilities" Version="9.0.4" />
10-
<PackageVersion Include="Microsoft.Extensions.Http" Version="9.0.4" />
11-
<PackageVersion Include="Microsoft.Extensions.Logging" Version="9.0.4" />
8+
<PackageVersion Include="Microsoft.AspNetCore.OpenApi" Version="10.0.0-preview.3.25172.1" />
9+
<PackageVersion Include="Microsoft.AspNetCore.WebUtilities" Version="10.0.0-preview.3.25172.1" />
10+
<PackageVersion Include="Microsoft.Extensions.Http" Version="10.0.0-preview.3.25171.5" />
11+
<PackageVersion Include="Microsoft.Extensions.Logging" Version="10.0.0-preview.3.25171.5" />
1212
<PackageVersion Include="Serilog" Version="4.2.0" />
1313
<PackageVersion Include="Serilog.Extensions.Hosting" Version="9.0.0" />
1414
<PackageVersion Include="Serilog.Settings.Configuration" Version="9.0.0" />

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project>
22
<PropertyGroup>
3-
<TargetFramework>net9.0</TargetFramework>
3+
<TargetFramework>net10.0</TargetFramework>
44
<Nullable>enable</Nullable>
55
<LangVersion>latest</LangVersion>
66
<ImplicitUsings>enable</ImplicitUsings>

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:9.0-alpine AS build
1+
FROM mcr.microsoft.com/dotnet/sdk:10.0-preview-alpine AS build
22

33
WORKDIR /app
44

@@ -10,7 +10,7 @@ RUN dotnet restore ./Api/Api.csproj
1010

1111
RUN dotnet publish ./Api/Api.csproj -c Release --no-restore -o /app/publish /p:UseAppHost=false
1212

13-
FROM mcr.microsoft.com/dotnet/aspnet:9.0-alpine
13+
FROM mcr.microsoft.com/dotnet/aspnet:10.0-preview-alpine
1414

1515
COPY --from=build /app/publish .
1616

Tests/Directory.Packages.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
55
</PropertyGroup>
66
<ItemGroup>
7-
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.4" />
7+
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.0.0-preview.3.25172.1" />
88
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
99
<PackageVersion Include="Microsoft.Testing.Extensions.CodeCoverage" Version="17.13.1" />
1010
<PackageVersion Include="NSubstitute" Version="5.3.0" />

global.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"sdk": {
3-
"version": "9.0.203",
3+
"version": "10.0.100-preview.3.25201.16",
44
"rollForward": "latestMinor",
55
"allowPrerelease": false
66
}
7-
}
7+
}

0 commit comments

Comments
 (0)