dotnet / dotnet/dotnet-api-docs

Environment.OSVersion has misleading notes on 8/10 compatibility

Aperta
#3,605 7 commenti 0 reazioni 0 assegnatari Vedi su GitHub
area-System.Runtime doc-bug Pri1 Pri3
Lingua principale
C#
Stelle
950
Fork
1.7k
Merge medio
2g 19h
PR unite (30g)
52

Descrizione

_I have a headless machine which I want to report its Windows version so I know if the machine is up to date, and Environment.OSVersion has been very frustrating. After learning about everything I've learned, it still doesn't do what I need, because I need the full revision number. (i.e. 10.0.16299.192) and OSVersion insists on a .0 at the end. I'm using a WMI call instead._ But anyways, Docs bug:

https://docs.microsoft.com/en-us/dotnet/api/system.environment.osversion?view=netframework-4.7.1

Both the "Important" and "Note" sections here simply state that from now on, OSVersion reports Windows 8 and above as Windows 6.2, with no qualifying details. This is wrong. I realized this due to reading the High DPI for Windows Forms documentation here: https://docs.microsoft.com/en-us/dotnet/framework/winforms/high-dpi-support-in-windows-forms

The correct information can only be found by digging into the "Operating System Version" link, which is an old MSDN page, and then noticing the link about "Targeting your application for Windows" at the bottom of _that_ page. Nothing on System.Environment.OSVersion's Docs page would lead me to realize this.

Ideally, the Important/Note segments, which are somewhat redundant, should be collapsed into a single box which summarizes the default behavior as well as links directly to details on how to specify the supportedOS: https://msdn.microsoft.com/en-us/library/windows/desktop/dn481241.aspx

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia dalla documentazione dell’API System.Environment.OSVersion collegata nell’issue, soprattutto dalle sezioni Important e Note, quindi segui i riferimenti esistenti a Operating System Version e supportedOS. Il lavoro è completato quando la pagina riassume accuratamente il comportamento predefinito della versione di Windows, rimuove le indicazioni ridondanti dove appropriato e collega direttamente ai dettagli di supportedOS.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
csharp
Ambito
documentation, operating-systems
Tipo di issue
Documentazione
Difficoltà
2/5
Tempo stimato
1-3 ore
Stato di attività
Ferma
Chiarezza
Specificata chiaramente
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.