Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uninstall of SDK leaves trailing files which trips VS #26474

Closed
smoothdeveloper opened this issue Jul 5, 2022 · 3 comments
Closed

Uninstall of SDK leaves trailing files which trips VS #26474

smoothdeveloper opened this issue Jul 5, 2022 · 3 comments
Assignees
Labels
Area-Install untriaged Request triage from a team member

Comments

@smoothdeveloper
Copy link

Visual Studio Version

VS2022 and VS2019

Summary

Due to how F# Interactive extension works, it is possible/currently recommended for user to add FSharp.DependencyManager.*.dll assemblies next to the ones that ship with FSI dotnet\sdk\{version}\FSharp

The issue I am facing is that once VS or user decides to clean up an older version of the SDK by uninstalling it, it will leave the files trailing in that folder, disregarding the fact that that particular version of dotnet sdk is not on the system anymore.

Steps to Reproduce

  1. install a particular release of SDK you are going to uninstall
  2. pick an extension (https://github.com/fsprojects/Paket/releases has such extension) and download it
  3. drop it under the FSharp folder of the particular release of SDK
  4. make a project, pinning it with the version of SDK, and allow rollForward feature in global.json
  5. open the project (works)
  6. uninstall the particular release of SDK
  7. open the project (doesn't work)

Actual Behavior

[MSB4236] The SDK 'Microsoft.NET.Sdk' specified could not be found.

(unloaded) is written next to each project in the solution explorer.

Expected Behavior

Either:

  • the detection of SDK shouldn't limit itself to presence of folder
  • the uninstall should completely remove the folder
  • the rollForward should be honoured as fallback before issuing MSB4236 to the end user

User Impact

VS is unable to load a solution until user figures the situation out, maybe the error message is not clear and could list the particular SDK folder it attempted to use.

Related: dotnet/fsharp#8880

@tmeschter
Copy link
Contributor

We're going to move this to the dotnet/sdk repo as it has to do specifically with the SDK rather than the project system.

@tmeschter tmeschter transferred this issue from dotnet/project-system Jul 7, 2022
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Install untriaged Request triage from a team member labels Jul 7, 2022
@joeloff
Copy link
Member

joeloff commented Jul 12, 2022

If you manually copy files into a folder that was managed by an MSI installation, removing the SDK will not remove files because it did not install them. Removing an MSI is not a simple matter of deleting files. if you manually copied files into the SDK you will need to manually remove them.

@joeloff joeloff closed this as completed Jul 12, 2022
@smoothdeveloper
Copy link
Author

@joeloff any chance to enhance the error message, to list the actual SDK folders that are used? This is disregarding why the error shows up (e.g. I am facing the same error message with no relation to the issue right now).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Install untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

3 participants