docs
docs copied to clipboard
Use console app template for dotnet publish container tutorial
Type of issue
Other (describe below)
Description
I would like to suggest to use a console app instead of a service worker template as a sample project for the "Containerize a .NET app with dotnet publish" tutorial.
Why?
When searching online, e.g. for "dotnet publish container", the tutorial is the first result. Also other articles, such as the "Tutorial: Containerize a .NET app", link directly to it.
Currently, the tutorial uses the worker template and SDK as the sample project. Therefore, it nowhere mentions the <EnableSdkContainerSupport> tag, because web and worker SDK projects implicitly reference it, while it's essential to add it to console application projects to make them publishable as containers.
IMHO: It would already be a huge improvement, if the tutorial article would mention the <EnableSdkContainerSupport> tag or link back to the relevant section of the "Overview" page. But documentation that simply marks steps and information as optional, rather than inlining required ones as easily overlooked side notes, is even easier to follow and clearer to the reader. Also, console apps (and the used SDK), are the common base for both, woker and web projects, which would make the tutorial more universally applicable and less prone to leaving developers of simpler application types feeling lost due to implicit references and configurations present in more specialized templates. And therfore, [goto: startOfIssueDescription]
Page URL
https://learn.microsoft.com/en-us/dotnet/core/containers/sdk-publish
Content source URL
https://github.com/dotnet/docs/blob/main/docs/core/containers/sdk-publish.md
Document Version Independent Id
0e37627b-37c5-850b-08a2-41bd16630452
Platform Id
158a640a-1b88-1e9c-5c97-de48cfa28d50
Article author
@gewarren
Metadata
- ID: b3889986-be82-b274-321c-d2fa84067c37
- PlatformId: 158a640a-1b88-1e9c-5c97-de48cfa28d50
- Service: dotnet-fundamentals
@baronfel Any thoughts on this?
In .NET 10 and 9.0.300 we've lifted the need to specify EnableContainerSdkSupport, so I'd approve of a move to using the console template for sure.