Skip to content

Commit e536caa

Browse files
authored
Merge pull request #21877 from brandonh6k/main
Update dotnet to .NET 8.0 (LTS)
1 parent 5df76d0 commit e536caa

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

content/guides/dotnet/containerize.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Let's get started!
6060

6161
? What application platform does your project use? ASP.NET Core
6262
? What's the name of your solution's main project? myWebApp
63-
? What version of .NET do you want to use? 6.0
63+
? What version of .NET do you want to use? 8.0
6464
? What local port do you want to use to access your server? 8080
6565
```
6666

content/guides/dotnet/develop.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -307,19 +307,19 @@ The following is the updated Dockerfile.
307307
```Dockerfile {hl_lines="10-13"}
308308
# syntax=docker/dockerfile:1
309309
310-
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:6.0-alpine AS build
310+
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS build
311311
ARG TARGETARCH
312312
COPY . /source
313313
WORKDIR /source/src
314314
RUN --mount=type=cache,id=nuget,target=/root/.nuget/packages \
315315
dotnet publish -a ${TARGETARCH/amd64/x64} --use-current-runtime --self-contained false -o /app
316316
317-
FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine AS development
317+
FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS development
318318
COPY . /source
319319
WORKDIR /source/src
320320
CMD dotnet run --no-launch-profile
321321
322-
FROM mcr.microsoft.com/dotnet/aspnet:6.0-alpine AS final
322+
FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine AS final
323323
WORKDIR /app
324324
COPY --from=build /app .
325325
ARG UID=10001
@@ -380,7 +380,7 @@ secrets:
380380
file: db/password.txt
381381
```
382382

383-
Your containerized application will now use the `mcr.microsoft.com/dotnet/sdk:6.0-alpine` image, which includes development tools like `dotnet test`. Continue to the next section to learn how you can run `dotnet test`.
383+
Your containerized application will now use the `mcr.microsoft.com/dotnet/sdk:8.0-alpine` image, which includes development tools like `dotnet test`. Continue to the next section to learn how you can run `dotnet test`.
384384

385385
## Summary
386386

content/guides/dotnet/run-tests.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ You should see output that contains the following.
3636
Starting test execution, please wait...
3737
A total of 1 test files matched the specified pattern.
3838

39-
Passed! - Failed: 0, Passed: 1, Skipped: 0, Total: 1, Duration: < 1 ms - /source/tests/bin/Debug/net6.0/tests.dll (net6.0)
39+
Passed! - Failed: 0, Passed: 1, Skipped: 0, Total: 1, Duration: < 1 ms - /source/tests/bin/Debug/net8.0/tests.dll (net8.0)
4040
```
4141

4242
To learn more about the command, see [docker compose run](/reference/cli/docker/compose/run/).
@@ -50,20 +50,20 @@ The following is the updated Dockerfile.
5050
```dockerfile {hl_lines="9"}
5151
# syntax=docker/dockerfile:1
5252

53-
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:6.0-alpine AS build
53+
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS build
5454
ARG TARGETARCH
5555
COPY . /source
5656
WORKDIR /source/src
5757
RUN --mount=type=cache,id=nuget,target=/root/.nuget/packages \
5858
dotnet publish -a ${TARGETARCH/amd64/x64} --use-current-runtime --self-contained false -o /app
5959
RUN dotnet test /source/tests
6060

61-
FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine AS development
61+
FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS development
6262
COPY . /source
6363
WORKDIR /source/src
6464
CMD dotnet run --no-launch-profile
6565

66-
FROM mcr.microsoft.com/dotnet/aspnet:6.0-alpine AS final
66+
FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine AS final
6767
WORKDIR /app
6868
COPY --from=build /app .
6969
ARG UID=10001
@@ -92,16 +92,16 @@ You should see output containing the following.
9292
#11 1.564 Determining projects to restore...
9393
#11 3.421 Restored /source/src/myWebApp.csproj (in 1.02 sec).
9494
#11 19.42 Restored /source/tests/tests.csproj (in 17.05 sec).
95-
#11 27.91 myWebApp -> /source/src/bin/Debug/net6.0/myWebApp.dll
96-
#11 28.47 tests -> /source/tests/bin/Debug/net6.0/tests.dll
97-
#11 28.49 Test run for /source/tests/bin/Debug/net6.0/tests.dll (.NETCoreApp,Version=v6.0)
95+
#11 27.91 myWebApp -> /source/src/bin/Debug/net8.0/myWebApp.dll
96+
#11 28.47 tests -> /source/tests/bin/Debug/net8.0/tests.dll
97+
#11 28.49 Test run for /source/tests/bin/Debug/net8.0/tests.dll (.NETCoreApp,Version=v8.0)
9898
#11 28.67 Microsoft (R) Test Execution Command Line Tool Version 17.3.3 (x64)
9999
#11 28.67 Copyright (c) Microsoft Corporation. All rights reserved.
100100
#11 28.68
101101
#11 28.97 Starting test execution, please wait...
102102
#11 29.03 A total of 1 test files matched the specified pattern.
103103
#11 32.07
104-
#11 32.08 Passed! - Failed: 0, Passed: 1, Skipped: 0, Total: 1, Duration: < 1 ms - /source/tests/bin/Debug/net6.0/tests.dll (net6.0)
104+
#11 32.08 Passed! - Failed: 0, Passed: 1, Skipped: 0, Total: 1, Duration: < 1 ms - /source/tests/bin/Debug/net8.0/tests.dll (net8.0)
105105
#11 DONE 32.2s
106106
```
107107

0 commit comments

Comments
 (0)