Small SDK lookup fix (dotnet/core-setup#4807)
authorVitek Karas <vitek.karas@microsoft.com>
Wed, 5 Dec 2018 18:34:43 +0000 (10:34 -0800)
committerGitHub <noreply@github.com>
Wed, 5 Dec 2018 18:34:43 +0000 (10:34 -0800)
commit1448f685f23d2ab9d0e5bbcc9339febc12d021e2
tree80d792c32e336ccce90d1e114f0f8748a1d915b3
parent906d67bd46bc0b9118f36cfa54df0d500e98b4de
Small SDK lookup fix (dotnet/core-setup#4807)

* Improve SDK version lookup description

Link to official docs which have detailed description of the algorithm.
Add a note about the hostfxr export options as well.

* Fix a small issue to avoid looking up directories like -1.-1.-1

If the global.json specifies SDK version but we can't find that version in a given search location, the code would end up checking if a folder with name "-1.-1.-1" exist. This is because we're left with empty version structure which is represented as -1.-1.-1.
Not only this is a small perf issue (unnecessarily looking at disk), but if the folder existed by any chance we would have returned that version for use.

Commit migrated from https://github.com/dotnet/core-setup/commit/ba6f9e0a2f0758dc8e3bc3eb717feecc6c4dae2e
docs/installer/design-docs/multilevel-sharedfx-lookup.md
src/installer/corehost/cli/fxr/sdk_resolver.cpp
src/installer/test/HostActivationTests/GivenThatICareAboutMultilevelSDKLookup.cs