That’s pretty much my approach too, after a few years troubleshooting across environments, I combined both methods. If you want a one-stop way to check .net version cmd, both Core and Framework, I use this PowerShell combo:
dotnet --info
Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP' -Recurse |
Get-ItemProperty -Name Version -EA 0 |
Where { $_.Version -match '^\d' } |
Select Version, PSChildName
This way, I get the full picture, Framework versions tucked away in the registry, and modern .NET versions from the CLI. Saves time when I’m auditing multiple setups