Skip to content

Commit 4416e16

Browse files
committed
update to dotnet 10
1 parent 533e23e commit 4416e16

8 files changed

Lines changed: 21 additions & 38 deletions

File tree

.github/workflows/dotnet.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
- uses: actions/checkout@v4
15+
- uses: actions/checkout@v6
1616
- name: Setup .NET
17-
uses: actions/setup-dotnet@v4
17+
uses: actions/setup-dotnet@v5
1818
with:
19-
dotnet-version: 9.0.x
19+
dotnet-version: 10.0.x
2020
- name: Info
2121
run: |
2222
dotnet tool update -g dotnet-execute

OpenReservation.Notification.sln

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

OpenReservation.Notification.slnx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<Solution>
2+
<Project Path="OpenReservation.Notification/OpenReservation.Notification.csproj" />
3+
</Solution>

OpenReservation.Notification/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
1+
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS base
22
USER app
33
WORKDIR /app
44
EXPOSE 8080
55

6-
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS publish
6+
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS publish
77
WORKDIR /src
88
COPY ["OpenReservation.Notification/OpenReservation.Notification.csproj", "OpenReservation.Notification/"]
99
RUN dotnet restore "OpenReservation.Notification/OpenReservation.Notification.csproj"

OpenReservation.Notification/OpenReservation.Notification.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
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
<InvariantGlobalization>true</InvariantGlobalization>
88
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
99
</PropertyGroup>
1010

1111
<ItemGroup>
12-
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.2" />
13-
<PackageReference Include="Scalar.AspNetCore" Version="2.0.18" />
12+
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="10.0.1" />
13+
<PackageReference Include="Scalar.AspNetCore" Version="2.11.10" />
1414
<PackageReference Include="SendGrid" Version="9.29.3" />
15-
<PackageReference Include="WeihanLi.Common" Version="1.0.74" />
16-
<PackageReference Include="WeihanLi.Web.Extensions" Version="2.1.0" />
15+
<PackageReference Include="WeihanLi.Common" Version="1.0.85" />
16+
<PackageReference Include="WeihanLi.Web.Extensions" Version="2.3.1" />
1717
</ItemGroup>
1818

1919
<ItemGroup>

OpenReservation.Notification/Program.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,18 @@
3030
app.UseAuthentication()
3131
.UseAuthorization();
3232

33-
var healthChecks = app.MapGroup("/api/health");
34-
healthChecks.MapGet("/live", () => Results.Ok()).ShortCircuit().DisableHttpMetrics();
35-
healthChecks.MapGet("/ready", () => Results.Ok()).ShortCircuit().DisableHttpMetrics();
33+
var healthChecks = app.MapProbes("/api/health");
34+
healthChecks.MapGet("/live", () => Results.Ok());
35+
healthChecks.MapGet("/ready", () => Results.Ok());
3636

3737
app.MapRuntimeInfo().ShortCircuit().DisableHttpMetrics();
38+
app.MapConfigInspector().DisableHttpMetrics();
39+
3840
app.MapPost("/api/notification/{notificationType}", async (NotificationType notificationType, NotificationRequest request, HttpContext context) =>
3941
{
4042
var notification = context.RequestServices.GetRequiredKeyedService<INotification>(notificationType);
4143
await notification.SendAsync(request);
4244
return Results.Ok();
43-
}).WithOpenApi().RequireAuthorization();
45+
}).RequireAuthorization();
4446

4547
app.Run();

OpenReservation.Notification/Properties/launchSettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"commandName": "Project",
66
"dotnetRunMessages": true,
77
"launchBrowser": true,
8-
"launchUrl": "swagger",
8+
"launchUrl": "scalar",
99
"applicationUrl": "http://localhost:5173",
1010
"environmentVariables": {
1111
"ASPNETCORE_ENVIRONMENT": "Development"

azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ steps:
2929
displayName: 'Use .NET sdk'
3030
inputs:
3131
packageType: sdk
32-
version: 9.0.x
32+
version: 10.0.x
3333
includePreviewVersions: true
3434

3535
- script: |

0 commit comments

Comments
 (0)