-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update samples to .NET 7 #3989
Update samples to .NET 7 #3989
Conversation
# Configure web servers to bind to port 80 when present | ||
ASPNETCORE_URLS=http://+:80 ` | ||
# Enable detection of running in a container | ||
DOTNET_RUNNING_IN_CONTAINER=true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this removed?
@@ -2,7 +2,7 @@ | |||
|
|||
<PropertyGroup> | |||
<OutputType>Exe</OutputType> | |||
<TargetFramework>net6.0</TargetFramework> | |||
<TargetFramework>net7.0</TargetFramework> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The complexapp test project also needs to be updated.
samples/run-in-sdk-container.md
Outdated
@@ -37,12 +37,12 @@ a8" `Y42 a8" "8a 42 42P' `"8a a8P_____42 42 | |||
"8a, ,d42 "8a, ,a8" 42, 42 42 "8b, ,aa 42, | |||
`"8bbdP"Y8 `"YbbdP"' "Y428 42 42 `"Ybbd8"' "Y428 | |||
|
|||
.NET 6.0.0 | |||
.NET 7.0.0-preview.7.22375.6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be appropriate to edit out the version suffix - -preview.7.22375.6
|
||
# final stage/image | ||
# Uses the ltsc2022 release; 20H2 and 1809 are other choices | ||
# Uses the ltsc2022 release |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment no longer seems useful as the code is self documenting. I see other edits like this removed the entire line.
@@ -1,7 +1,7 @@ | |||
<Project Sdk="Microsoft.NET.Sdk.Web"> | |||
|
|||
<PropertyGroup> | |||
<TargetFramework>net6.0</TargetFramework> | |||
<TargetFramework>net7.0</TargetFramework> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Produces error if user follows Prerequisites that states .NET 6.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which prerequisites are you referring to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had no idea these instructions existed.
Given that the doc page has a drop-down that allows you to select which .NET version you want, it already had out-of-sync content even prior to this change to .NET 7. For example, if you select the 3.1 version, you still have instructions to clone the same repo which previously was using .NET 6 samples, so still not matching the pre-reqs for that version. As an aside, that version of the doc also specifies the out-of-support 3.0 version in the Dockerfile snippets instead of using 3.1:
FROM mcr.microsoft.com/dotnet/core/sdk:3.0 AS build
I see two options:
- Don't rely on the dotnet-docker repo at all for the project code. Maintain a separate git repo specifically for the docs. I've seen other products do this, like Azure.
- Use git tags in the dotnet-docker repo to allow customers to
git checkout
at a specific tag to be described in the documentation. The git tags would refer to a specific commit in the repo appropriate for that version. So we could have a3.1-samples
tag that, when checked out, would give you the state of the repo when our samples were configured for 3.1. Similarly for other .NET versions.
@ldillonel, as a first step, please log an issue on the docs and link this comment thread. We can discuss further on that issue what the resolution should be.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mthalman I logged the issue on the docs page first. Here's the link dotnet/AspNetCore.Docs#26770
.csproj
andDockerfile
)