title: How to get .NET Core SDK Version from registry?
body: <p>My operating system is <strong>Windows 10 Professional</strong>.</p>
  <p>When I open <strong>PowerShell</strong> and run <code>dotnet --list-sdks</code> command, it list 3 .NET Core SDKs</p>
  <blockquote>
  <p>1.0.0-preview2-003131 [C:\Program Files\dotnet\sdk]<br>
  2.1.526 [C:\Program Files\dotnet\sdk]<br>
  3.1.101 [C:\Program Files\dotnet\sdk]</p>
  </blockquote>
  <p>When I run <code>dotnet --version</code>, the output is</p>
  <blockquote>
  <p>3.1.101</p>
  </blockquote>
  <p>So the latest .NET Core SDK is <strong>3.1.101</strong>.</p>
  <p>Then I open <strong>Registry Editor</strong> and go to <code>Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ASP.NET Core\Shared Framework</code> key. It shows me 2 sub keys <code>v2.1</code> and <code>v3.1</code>.</p>
  <p>When I go to <code>Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ASP.NET Core\Shared Framework\v3.1</code> key, it shows me 2 sub keys: <code>3.1.1</code> and <code>3.1.18</code>. <em>I was expecting only 1 key</em> <code>3.1.1</code>. Why there are 2 keys?</p>
  <p>When I go to <code>Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ASP.NET Core\Shared Framework\v3.1\3.1.1</code> key, I can see that the <code>Version</code> attribute's Data is <code>3.1.1.0</code> which is correct.</p>
  <p>When I go to <code>Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ASP.NET Core\Shared Framework\v3.1\3.1.18</code> key, I can see that the <code>Version</code> attribute's Data is <code>3.1.18.21365</code>. Where is this coming from?</p>
  <p>How to get correct .NET Core SDK Version from registry?</p>