dotnet / vscode-dotnet-runtime

VSCode Extension for Installing .NET via VS Code
MIT License
137 stars 259 forks source link

[NETE2ESDK][Redhat9.3][Redhat8.9] Installing different version .net SDK failed as custom dotnet installation exists on Redhat. #1624

Closed v-xiaofchen closed 9 months ago

v-xiaofchen commented 9 months ago

Describe the bug.

Installing different version .net SDK failed as custom dotnet installation exists on Redhat.

Reproduction Steps

  1. On Redhat 9.3 or 8.9
  2. Run the sample command ‘Install .NET SDK Globally via .NET Install Tool (Former Runtime Extension)‘ and enter 6.0.1xx
  3. After 6.0.124 is installed
  4. Run the sample command ‘Install .NET SDK Globally via .NET Install Tool (Former Runtime Extension)‘ and enter 7.0.103
  5. Observe

Expected Behavior

The SDK 7.0.103 is installed successfully.

Exceptions & Errors (if any)

Installing different version .net SDK failed as custom dotnet installation exists Redhatbug1

Further technical details

OS: RHEL 9.3 and 8.9 VSCode: 1.85.1 Extensions: dotnet-install-tool-2.0.1

Note

This issue not repro on Ubuntu18.04,22.04 and 23.10.

v-xiaofchen commented 9 months ago

The same error if try installing .NET SDK again, here is detailed steps:

On Redhat Run the sample command ‘Install .NET SDK Globally via .NET Install Tool (Former Runtime Extension)‘. Use the version it provided, which is 7.0.103. Hit enter. After 7.0.103 is installed succeed Try to install 7.0.103 again and observe the output installagain

nagilson commented 9 months ago

Hm. I really don't know why this is broken at a cursory check. resolvePathAsSymlink is set to false for the redhat provider and we only resolve the symlink if that's true. And regarding the install, It shouldn't be in bin, that's for sure. Will need to look more closely at this.

nagilson commented 9 months ago

I think I have fixed this.

NicoleWang001 commented 9 months ago

Checked and this issue is fixed. image image