Closed Forgind closed 10 months ago
@rainersigwald , this looks good to me. Do you have any comments?
DOTNET_ROOT
seems analogous to DiscoveryOptions.DeveloperConsole
. Should we instead extend that concept and codepath to respect it (as well as the VS environment variables)?
DOTNET_ROOT
seems analogous toDiscoveryOptions.DeveloperConsole
. Should we instead extend that concept and codepath to respect it (as well as the VS environment variables)?
There are definitely some similarities. I don't think there's a lot of overlap, though, which would make it tricky to try to reuse too much code—DiscoveryOptions.DeveloperConsole is specifically intended to be for NetFx users of VS developer command prompts, a very specific scenario. Of note, the environment variables it checks for there (VSINSTALLDIR, VSCMD_VER, and VisualStudioVersion) are rather VS-specific and not relevant to the DotNetSdkLocationHelper.
So I guess I'm not entirely clear on what concrete changes you're proposing? Though as I was rooting (hehe) around, I did notice there's also a DOTNET_ROOT(x86), so I should probably take that into account as well even though no one (to my knowledge) has specifically requested that yet.
@baronfel , @rainersigwald any blockers for this one?
Per https://github.com/dotnet/format/issues/1925#issuecomment-1664382538 (see that issue for more context)