From e215fa18e0f11f1a951a6b3bf0608f17187b0a0b Mon Sep 17 00:00:00 2001 From: Martin Othamar Date: Thu, 14 Nov 2024 13:50:30 +0100 Subject: [PATCH 1/2] Update to .NET 8 --- .github/workflows/localtest-pr.yml | 4 ++-- .vscode/launch.json | 2 +- Dockerfile | 4 ++-- global.json | 7 +++++++ src/LocalTest.csproj | 2 +- 5 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 global.json diff --git a/.github/workflows/localtest-pr.yml b/.github/workflows/localtest-pr.yml index 24cf4984..01f3c4c2 100644 --- a/.github/workflows/localtest-pr.yml +++ b/.github/workflows/localtest-pr.yml @@ -11,10 +11,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Setup .NET Core SDK 6.0.x + - name: Setup .NET Core SDK 8.0.x uses: actions/setup-dotnet@v3 with: - dotnet-version: '6.0.x' + dotnet-version: '8.0.x' - name: Install dependencies run: dotnet restore working-directory: 'src/' diff --git a/.vscode/launch.json b/.vscode/launch.json index 779ff0bb..b5764c7e 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -9,7 +9,7 @@ "type": "coreclr", "request": "launch", "preLaunchTask": "build", - "program": "${workspaceFolder}/src/bin/Debug/net6.0/LocalTest.dll", + "program": "${workspaceFolder}/src/bin/Debug/net8.0/LocalTest.dll", "args": [], "cwd": "${workspaceFolder}/src", "stopAtEntry": false, diff --git a/Dockerfile b/Dockerfile index d9db89b4..1299f312 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine AS build +FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS build WORKDIR /src COPY ./src/LocalTest.csproj . @@ -7,7 +7,7 @@ RUN dotnet restore LocalTest.csproj COPY ./src . RUN dotnet publish LocalTest.csproj -c Release -o /app_output -FROM mcr.microsoft.com/dotnet/aspnet:6.0-alpine AS final +FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine AS final EXPOSE 5101 WORKDIR /app COPY --from=build /app_output . diff --git a/global.json b/global.json new file mode 100644 index 00000000..fee645a7 --- /dev/null +++ b/global.json @@ -0,0 +1,7 @@ +{ + "sdk": { + "version": "8.0.100", + "rollForward": "latestFeature", + "allowPrerelease": false + } +} diff --git a/src/LocalTest.csproj b/src/LocalTest.csproj index fa029b08..de5db57d 100644 --- a/src/LocalTest.csproj +++ b/src/LocalTest.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 56f36ce2-b44b-415e-a8a5-f399a76e35b9 enable From dfb44401adb552ed96edb475ac6fb7b9acbe9e96 Mon Sep 17 00:00:00 2001 From: Martin Othamar Date: Thu, 14 Nov 2024 13:59:23 +0100 Subject: [PATCH 2/2] Update external pkgs --- src/LocalTest.csproj | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/LocalTest.csproj b/src/LocalTest.csproj index de5db57d..68052349 100644 --- a/src/LocalTest.csproj +++ b/src/LocalTest.csproj @@ -14,13 +14,13 @@ - - + + - - - - + + + +