-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Use the old program style: Add info on converting top-level statements to explicit entry point #28223
Comments
Thanks for the suggestion, but this article is about creating new projects, and it already shows the old template code near the top of the article. Web app templates are covered in the ASP.NET Core documentation. |
@tdykstra Is there another place in the docs which covers converting an existing .NET 6 console or web app to use an explicit entry point? By way of background, the question came up for me with an integration tests that needed to reference more than one web project. Because |
@tdykstra this may be a missing scenario, approaching it from the point of view that @tonysneed is indicating. In general the requests have been from the context of "restore the old template" which the article covers. But the context here, I believe, is a missing scenario: "How do I specify an entry point for an app" This would include:
|
That doesn't seem to fit the context of an article that is specifically about project creation using the template. Maybe it would fit in https://docs.microsoft.com/en-us/dotnet/csharp/fundamentals/program-structure/top-level-statements#implicit-entry-point-method -- we could add "if you need an explicit entry point" text. @BillWagner what do you think? |
In the section, Use the old program style, add information on how to convert an existing .NET 6 console or web app to use an explicit entry point instead of top-level statements. For example, in a .NET 6 console app you can simply replace the code in Program.cs with the following:
An example should also be included for adding an explicit entry point to a web app.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: