Improve visibility of recommendation not to use the 'latest' langversion #42400
Labels
doc-enhancement
Improve the current content [org][type][category]
dotnet-csharp/svc
in-pr
This issue will be closed (fixed) by an active pull request.
lang-reference/subsvc
Pri1
High priority, do before Pri2 and Pri3
📌 seQUESTered
Identifies that an issue has been imported into Quest.
Type of issue
Other (describe below)
Description
The C# team recommends against using langversion latest. This recommendation is currently not very visible.
Goals:
Having an anchored link to share that takes people directly to the advice, worded strongly enough to have the effect that the C# team would desire the messaging to have.
Catching attention everywhere that people are looking at langversion options. I found these additional pages which do not have the recommendation:
Other questions:
Can the reasoning be even stronger than currently stated? The currently stated reasoning would also equally recommend against using explicit langversion
13
with .NET 6. But potentially, there's also rationale that says if you're going to use C# 13 with .NET 6 anyway, then<Langversion>13</LangVersion>
is still better than<LangVersion>latest</LangVersion>
. It makes the build more predictable between machines with different SDK versions installed, whether they're build machines or developer machines. There is no preference between the two in the rationale given in the current recommendation. The current rationale is only about mismatching with the target framework, and not about lack of predictability of a floating version between machines.It's using an "important" style, but I wonder if a "warning" style would be appropriate and stand out better. E.g.:
Page URL
https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/language?source=docs#langversion
Content source URL
https://github.com/dotnet/docs/blob/main/docs/csharp/language-reference/compiler-options/language.md
Document Version Independent Id
19f59267-c4c1-eb0e-7e48-45ffd6e2d9d1
Article author
@BillWagner
Metadata
Associated WorkItem - 310945
The text was updated successfully, but these errors were encountered: