Skip to content

Commit d027ffc

Browse files
committed
Update .NET guide to .NET 10
1 parent e21ee9d commit d027ffc

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
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? 8.0
63+
? What version of .NET do you want to use? 10.0
6464
? What local port do you want to use to access your server? 8080
6565
```
6666

content/guides/dotnet/develop.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -288,11 +288,11 @@ immediately reflected in the running container.
288288
Open `docker-dotnet-sample/src/Pages/Index.cshtml` in an IDE or text editor and update the student name text on line 13 from `Student name is` to `Student name:`.
289289

290290
```diff
291-
- <p>Student Name is @Model.StudentName</p>
291+
- <p>Student name is @Model.StudentName</p>
292292
+ <p>Student name: @Model.StudentName</p>
293293
```
294294

295-
Save the changes to `Index.cshmtl` and then wait a few seconds for the application to rebuild. Refresh [http://localhost:8080](http://localhost:8080) in your browser and verify that the updated text appears.
295+
Save the changes to `Index.cshtml` and then wait a few seconds for the application to rebuild. Refresh [http://localhost:8080](http://localhost:8080) in your browser and verify that the updated text appears.
296296

297297
Press `ctrl+c` in the terminal to stop your application.
298298

@@ -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:8.0-alpine AS build
310+
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.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:8.0-alpine AS development
317+
FROM mcr.microsoft.com/dotnet/sdk:10.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:8.0-alpine AS final
322+
FROM mcr.microsoft.com/dotnet/aspnet:10.0-alpine AS final
323323
WORKDIR /app
324324
COPY --from=build /app .
325325
ARG UID=10001
@@ -379,7 +379,7 @@ secrets:
379379
file: db/password.txt
380380
```
381381

382-
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`.
382+
Your containerized application will now use the `mcr.microsoft.com/dotnet/sdk:10.0-alpine` image, which includes development tools like `dotnet test`. Continue to the next section to learn how you can run `dotnet test`.
383383

384384
## Summary
385385

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/net8.0/tests.dll (net8.0)
39+
Passed! - Failed: 0, Passed: 1, Skipped: 0, Total: 1, Duration: < 1 ms - /source/tests/bin/Debug/net10.0/tests.dll (net10.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:8.0-alpine AS build
53+
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.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:8.0-alpine AS development
61+
FROM mcr.microsoft.com/dotnet/sdk:10.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:8.0-alpine AS final
66+
FROM mcr.microsoft.com/dotnet/aspnet:10.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/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)
95+
#11 27.91 myWebApp -> /source/src/bin/Debug/net10.0/myWebApp.dll
96+
#11 28.47 tests -> /source/tests/bin/Debug/net10.0/tests.dll
97+
#11 28.49 Test run for /source/tests/bin/Debug/net10.0/tests.dll (.NETCoreApp,Version=v10.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/net8.0/tests.dll (net8.0)
104+
#11 32.08 Passed! - Failed: 0, Passed: 1, Skipped: 0, Total: 1, Duration: < 1 ms - /source/tests/bin/Debug/net10.0/tests.dll (net10.0)
105105
#11 DONE 32.2s
106106
```
107107

0 commit comments

Comments
 (0)