-
Notifications
You must be signed in to change notification settings - Fork 6k
.NET 6 template changes for dotnet new console
#25085
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
Comments
This looks good and matches the goal. I'd add that multiple people will encounter this link. We might want a landing page that has a bit about what top level programs are and has a few links:
This last set of things would be super confusing for a new user, but pretty essential for any current programmer. Some of this is demonstrated in the current tutorial https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/tutorials/top-level-statements, but not laid out directly. That tutorial needs will not be best practice for C# 10 (implicit usings) |
Thanks @KathleenDollard I think this article covers a lot of your additional points. I'd like to keep this new link destination a short article that explains how to build the mental map from top-level programs to traditional tutorial content. That will point to these two articles, and let people explore more when they are ready. But the first touch is to remove the confusion by having different code than you were expecting. |
Fixes dotnet#25085 Describe the updated console app template changes, and point to more details on those language features.
* Add article on new template output Fixes #25085 Describe the updated console app template changes, and point to more details on those language features. * fix broken link * proofread and edit * respond to feedback * respond to feedback. * Apply suggestions from code review Co-authored-by: Kathleen Dollard <[email protected]> * grammar * Apply suggestions from code review Co-authored-by: Andy (Steve) De George <[email protected]> Co-authored-by: Kathleen Dollard <[email protected]> Co-authored-by: Andy (Steve) De George <[email protected]>
For .NET 6, in preview 7, the “dotnet new console” app and Visual Studio’s “File:New Project” template for console apps will use top level statements.
We expect new developers to find this confusing if they are following an existing tutorial that shows the earlier Program.cs generated by those templates.
We need a new doc that helps these customers map from the tutorial text (using
static void Main()
in aProgram
class in a namespace) to the new output using top-level statements.This new article will be linked from an aka.ms link that describes the changes.
The text was updated successfully, but these errors were encountered: