-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Windows update keeps install .NET Runtime & SDK even I deleted them #6069
Comments
This is how Microsoft Update (MU) works at the moment. More details at https://devblogs.microsoft.com/dotnet/net-core-updates-coming-to-microsoft-update/ Tagging @jamshedd to see if there are any plans on changing this for MU. |
.NET Core updates are offered via MU only if you have a previous patch for the same Core version already installed. Make sure you remove all 2.1 versions from Add-Remove Programs and also remove the 2.1 components in Visual Studio, after that MU will not offer 2.1 updates. The most likely explanation is you have .NET Core 2.1 installed through Visual Studio. |
I'm sure I don't have .NET Core 2.1 installed. Maybe the reason of the problem? After I updated to visual studio to 16.9 which seems I switched to ".NET 5 SDK v5.0.201" But I found that there's still folder "C:\Program Files\dotnet\sdk\5.0.103" with many files in it. So the old .NET 5 SDK doesn't fully removed while update? |
Sorry I thought the issue was about .NET Core 2.1 being left behind, I now realize you're talking about .NET 5.0.103 being left behind when .NET 5.0.201 is installed. This is by design - the 103 and 201 SDKs are different "bands" and the 201 SDK does not update the 103 band, it installs side by side. If you do not want the 103 band you can remove it from Add-Remove Programs and as long as VS has also been updated to at least 16.9 it should not come back. |
I have removed those files but seems it still not work. Checked with dotnet command there's what I have installed. |
Sorry it is not clear to me what is not working. The screenshot shows you no longer have 5.0.103 installed or any version of .NET Core 2.1 installed after you uninstalled, which looks as expected to me. Could you elaborate on what you expect to see instead? |
@jamshedd yesterday, after this month's update, I realized that the 5.0.2xx and 3.1.1xx installations on my machine are redundant and uninstalled them, but today Windows Update decided to bring them back. FWIW on my machine there is also Visual Studio Enterprise 2019 16.11.3, and Visual Studio 2022 Preview 4. |
@teo-tsirpanis, would you be up for trying this again? Remove the old/redundant versions you don't want, reboot, and then share with me the output of: dotnet.exe --list-runtimes Then do a scan on Microsoft Update (Check for Updates), install whatever is offered, and then run the above commands again. |
ΟΚ, this is my list after the removal:
The result of |
Do you have VS also installed on this machine? If so can you tell me what versions of VS (including update levels) are installed? |
There are Visual Studio Enterprise 2019 16.11.3, and Visual Studio 2022 Preview 4. |
I have have the same problem as @teo-tsirpanis - WU keeps installing .NET Core 2.1 and 3.1. |
It also seems when WSUS is behind the herd then it starts providing failed updates:
|
I have the same problem. I only have runtimes for .NET Core 3 and 6 installed. I also removed all traces of Visual Studio.
Windows Update is still forcing an unsupported .NET Core 2 (+ corresponding ASP.NET Core) runtime on my machine through the following update:
How can I troubleshoot this? What makes WU think said update should be applied? |
We have the same problem. I uninstalled .NET Core 2.1 and ASP.NET Core 5.0 completely due to them being EOL. But as soon as I check for Windows Update, it's reinstalling them... Before Windows Update check:
After Windows update check:
I used https://www.mcbsys.com/blog/2015/11/uninstall-and-hide-windows-updates/ to hide 5005418 and 5013354 and hope it's at least resolved for now. I also needed to hide all other superseeded ones by adjusting the script accordingly: The main issue seems to be, that even after the software is uninstalled, the Windows Update cache is keeping all prior know updates in the cache. All of these had been marked as |
Adding @joeloff and @csnellgrove1-zz |
If it's marked as not installed, the applicability logic may think it's installable. Updates for 2.1 and 3.1 (and 5.0) were based on a sequence of MSI detection logic. This meant that if you had Visual Studio installed, MU might bring in a full standalone SDK if it runs before VS is updated. Recently in 6.0 and 7.0 we changed the logic to only offer for standalone installs, so .NET copies installed by VS won't be updated through MU. It's possible some of the MSIs used for detection remains installed and is triggering the updates to offer. Can you try running the following: |
Registry:
I will try and manually uninstall all of them using |
I did some more searches. While the first one only finds .NET Standard 2.1 (which is OK), the second one found some more .NET 5 stuff that I'm also going to delete.
|
Not that if these were installed through VS, they may have a lingering dependency that will block removal through When you run msiexec, you can try |
It seems that his is not the only source. It got reinstalled again. Before and after are no mentions, the folder was recreated yesterday after the weekly Windows Update. It was also not available before in the
|
I did find an old |
Description
I already switched to .NET 5 with Visual Studio 16.9.
But windows update still installs the .NET Core 2 runtimes also the old .NET 5 SDK 5.0.104.
if I delete them, windows update will re-install them when I check for updates.
I don't want to disable Microsoft updates because I want it to update my desktop runtimes.
Configuration
System: Windows 10 20H2 x64 Enterprise. (19042.867)
The text was updated successfully, but these errors were encountered: