Skip to content

Conversation

@dsplaisted
Copy link
Member

Add InstallSdks, UpdateGlobalJson, and ConfigureInstallType

Copilot prompt:

Implement the #method:'Microsoft.DotNet.Tools.Bootstrapper.DotnetInstaller.ConfigureInstallType':4479-4606  method.  If the install type is user, remove any other folder with dotnet in it from the PATH and add the dotnetRoot to the PATH.  Also set the DOTNET_ROOT environment variable to dotnetRoot.

If the install type is Admin, unset DOTNET_ROOT, and add dotnetRoot to the path (removing any other dotnet folder from the path).

If the install type is None, unset DOTNET_ROOT and remove any dotnet folder from the path.

For any other install type, throw an ArgumentException.
Copilot prompt:

In #method:'Microsoft.DotNet.Tools.Bootstrapper.DotnetInstaller.ConfigureInstallType':4481-6459 what I meant by removing a folder from the path if it has dotnet in it was that you should check the contents of each folder and if it is a dotnet installation folder then it should be removed from the path.  A simple way to check if it's a dotnet installation folder is if it has a dotnet executable in it.
@dsplaisted dsplaisted merged commit 3e29ba6 into dotnet:dnup Aug 25, 2025
5 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant