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

allow management of 7.0 SDKs and Runtimes #235

Merged
merged 5 commits into from
Dec 13, 2022
Merged

Conversation

baronfel
Copy link
Member

@baronfel baronfel commented Aug 2, 2022

Bumps the maximum allowed version to 8.0.0, so that 7.0 and 7.0 previews can be managed.

Closes #230

@sergey-tihon
Copy link

Maybe better to set UpperLimit to 9.0.0? We will be safer for next year.

@nagilson
Copy link
Member

nagilson commented Nov 9, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines failed to run 1 pipeline(s).

@baronfel
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines failed to run 1 pipeline(s).

@baronfel
Copy link
Member Author

@sergey-tihon potentially, but I'd rather have a reason to come back and check on this project. Also for the 8.0 release we're hoping to have SDK management CLI commands in the SDK CLI, so we'll see if this project is still needed as much.

@tillig
Copy link

tillig commented Dec 12, 2022

It appears the changes here got approved. Is there something else that needs to be done to get this complete, something I could help with? The MSDN docs still show this as the way to uninstall .NET Core and for everything not Windows this is the only way shown to do the uninstall.

@baronfel
Copy link
Member Author

The tests need to pass, which is where I'm currently stumped.

@tillig
Copy link

tillig commented Dec 12, 2022

OK, I haven't worked on this project but maybe I can chip in a little later this week/early next. I have a Mac and a Windows machine so... maybe all that together will help. If I figure it out I'll add suggestions in here to indicate potential changes.

@marcpopMSFT
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@marcpopMSFT
Copy link
Member

@baronfel I made some changes based on my best guess as to what needed to be fixed here. That fix then broke a bunch of different tests. The main problem failing tests initially is the logic to prevent the uninstall tool to run against sdks/runtimes that VS needs to run (basically, it was bucketing everything from 3 through 7 together and just ensuring 7 was still installed which was flagged by two tests). I updated to create a new band for 2019 at least that will ensure that 5.0 is still needed. However, this whole thing makes me a bit uneasy as the tests are super finicky for what those values are. Also, I'm not sure how much we should prevent customers from uninstalling these things just because VS needs them as there is a lot of logic trying to handle that.

Something to consider if we do invest here of making this a bit more flexible. The tests are also pretty difficult to read and understand.

@tillig
Copy link

tillig commented Dec 13, 2022

Also, I'm not sure how much we should prevent customers from uninstalling these things just because VS needs them as there is a lot of logic trying to handle that.

While I think it's an interesting use case, there's definitely a non-zero population (like me) using this entirely without Visual Studio at all, so that restriction is more an annoyance than anything helpful. But I get it, I may not be in the majority, just voicing support for the case where removing that logic could make things easier here.

@marcpopMSFT marcpopMSFT merged commit 9b354de into main Dec 13, 2022
@marcpopMSFT
Copy link
Member

While I think it's an interesting use case, there's definitely a non-zero population (like me) using this entirely without Visual Studio at all, so that restriction is more an annoyance than anything helpful. But I get it, I may not be in the majority, just voicing support for the case where removing that logic could make things easier here.

I think we just don't know how customers are using the tool and in what contexts. My assumption is that while plenty of people may use it on a machine with VS, they are using it to specifically remove a version of .NET that they want gone, regardless of VS. VS repair would also fix things if the tool were too aggressive. Looking at the code, the VS tracking was the most complicated part and what limited our ability to get this PR in quickly.

@baronfel baronfel deleted the enable-removing-7 branch December 13, 2022 18:20
@RomBrz
Copy link

RomBrz commented Dec 22, 2022

I will try to improve the discusion about this talking about how i use this tool: My use of the DotNet Core Uninstaller is for servers only, i don't have Visual Studio installed on these servers, don't use SDKs, i'm only on the infrastructure side.

I manage some IIS servers clusters to hosting DotNet Core (and DotNet) systems, APIs, services, etc. So each month i have to update the servers to Windows Servers patches and download the latests Hosting Bundle for each DotNet version to install/update all my IIS servers to enable the newer applications to ran fine (and patch the older versions).

After the discover that i can update the DotNet from WSUS, I asked the WSUS team to include the DotNet Core and DotNet to update apps (ex: last month i asked then to enable DotNet 7 updates so these months the patches came with Windows Update).

So now i just ran Windows Update to update all the DotNet versions installed (3.1, 5.0, 6.0, 7.0)

I have two types of clusters:
Cluster A: all apps use the server shared DotNet. In this case i need the latest Hosting Bundle and the latest Runtime, and the server has all the DotNet versions (on latest versions) to be able to ran everything.
Cluster B: each app put your own DotNet built-in. In this case i only need the latest Hosting Bundle pack.

In an ideal world (example of the launch of the 7.0), i downloaded the 7.0.0 Hosting Bundle only, install everything on Cluster A and set a parameter to install only the Hosting Bundle on Cluster B. However, for some reason (i opened an issue, have to find the number), Install everything AND remove the Runtimes isn't the same that install only the Hosting Bundle. Seems like the IIS don't register the files, or something happens.

So basically i discovered and have been using the DotNet Core Uninstaller to do this:
Cluster A: Install the Full Hosting Bundle
Cluster B: Install the Full Hosting Bundle and after that, run "dotnet-core-uninstall remove --runtime --all --force --yes"

Addind to this, when the Windows Update updates the DotNet version, it install again the Runtimes, so each month now i have to install the Windows Update patches and after reboot, ran the "dotnet-core uninstall remove --runtimes" to clean all the runtimes.

So each time a new DotNet launches i came to the Github page to update my DotNet uninstaller to keeping work as i expected.

Sorry for the wall of text, but i think that could be a good thing to show why, where and how i use this software.

@RomBrz
Copy link

RomBrz commented Jul 11, 2023

@baronfel Hi, about this question, the package seems to be unsigned (#253)
I'm posting here as the latest version is listing this "issue" as a reason to exist.

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.

Plans for 7.0.0?
6 participants