Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Flexibility in SDK install folder

See original GitHub issue

As a Visual Studio user, I can specify the folder for the .NET Core SDK that is different from c:\program files\dotnet so that I can reduce the footprint on the system drive.

Visual Studio will have flexibility in its installation location - therefore, SDK will also have flexibility in its installation location.

Scenarios Installations:

  1. an SDK installation chained from a Visual Studio installation instance
  2. a ‘stand-alone’ SDK installation

Work Items

SetUp work items [area-Setup]:

Host work items [area-Host]:



SDK bundle ‘other-volume’ testing… To install the SDK bundle to another volume: Example: dotnet-sdk-3.0.100-alpha1-009719-win-x64.exe /install DOTNETHOME_X64="D:\dotnet\x64" DOTNETHOME_X86="D:\dotnet\x86" /log "installation.log" /quiet /norestart

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

vitek-karascommented, Mar 4, 2019

@johnbeisner might know the meaning of all the registry keys - do we have a document describing those? (if not, we definitely should).

@miloush Just curious what is the scenario you’re trying to solve:

  • All this information is already available if you run dotnet --info
  • Do you need this as an API - so that you can get this info without parsing the text output of dotnet --info?
  • What is the scenario where you need to know all the installed versions of SDKs?
  • What is the scenario where you need to know all the installed runtimes?
  • What about the other frameworks - runtime is in the Microsoft.NETCore.App, but there are other shared frameworks (ASP.NET, with .NET Core 3 there will be the WinForms/WPF one as well)

With the proposed changes by this issue these should work:

  • Host lives in the location specified by the HKLM\Software\dotnet\Setup\InstalledVersions\x64\InstallLocation (this is a new key) - there you should find the dotnet.exe - you can look at its version if you need to, but I would be very curious what is the scenario for that.
  • hostfxr - lives next to the host (See above) in the host/fxr subdirectory - the rule is to always use the latest available version (the older versions are effectively ignored)
  • Frameworks should also live next to the host in the shared subdirectory. I don’t know about the .version file, the host doesn’t use that. The host solely relies on the directory names to recognize the versions.
miloushcommented, Feb 24, 2019

I see, thank you. So as per your response to dotnet/cli#4904, I can get:

  • Host version from the registry (there is only one host)
  • Installed SDK versions by interop call to hostfxr_get_available_sdks in hardcoded %ProgramFiles%\dotnet\host\fxr\*\hostfxr.dll libraries.
  • Available runtime versions by checking hardcoded %ProgramFiles%\dotnet\shared\Microsoft.NETCore.App\*\.version files.


Read more comments on GitHub >

github_iconTop Results From Across the Web

How to change SDK installing positions to another disk?
Dear customer, the 'Shared components, tools, and SDKs' location can be set only once and on the first time that visual studio is...
Read more >
How to Install Android Studio IDE & SDK and Get Started ...
(For Windows) Use "File Explorer" to check the SDK installed directory. ... It is more flexible and therefore recommended to layout your UI...
Read more >
SDK Runtime developer guide
The SDK Runtime and Privacy Preserving APIs Repository on GitHub contains a set of individual Android Studio projects to help you get started,...
Read more >
SDK Runtime
This is an initial proposal for a flexible SDK Runtime and distribution technology. The following sections propose a series of changes ...
Read more >
Updating the Liberty Java runtime environment or software ...
Get the Liberty runtime environment and Java in a single package by installing the Liberty with Java EE 8 Web Profile and IBM®...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found