installer
installer copied to clipboard
Microsoft .Net Core Version 5.0.17 keeps reinstalling
Is there an existing issue for this?
- [X] I have searched the existing issues
Describe the bug
Hi, as I'm sure the community know .NET version 5.0.17 is no longer supported and users should move to version 6 or uninstall from the devices.
The issue is the software keeps reinstalling itself once being uninstalled. During the uninstallation process, all 5.0.17 directories are also deleted from programfiles(x86)% and %programfiles%. Also tried uninstalling .NET version 6 as well as 5.0.17, ensuring systems and drivers are up to date.
Has this happened to others and if so how did you fix it?
Hoping this is the right place to post.
Expected Behavior
.NET version 5.0.17 remain uninstalled.
Steps To Reproduce
No response
Exceptions (if any)
No response
.NET Version
5.0.17
Anything else?
No response
@T3chPers0n101 do you have Visual Studio on the machine or is this a stand-alone installation? If stand-alone, which bundle did you install (runtime, hosting, sdk, other)?
@T3chPers0n101 do you have Visual Studio on the machine or is this a stand-alone installation? If stand-alone, which bundle did you install (runtime, hosting, sdk, other)?
No Visual Studio on the machine, there are other Microsoft applications. I can't recall the installation sorry.
Was VS ever on the box? There is a current issue where if VS was on the box, there could be an orphaned reference (even if VS is later removed) that is causing Microsoft update to reinstall that. I think the only solution we know of so far is directly removing some registry values. If you would like that, we can provide those details.
@T3chPers0n101 Try running the following query: reg query HKLM\SOFTWARE\Classes\Installer\Dependencies /s /d /f "*.NET*5.0.17*"
It should drop information similar to the following

Grab anyone of the registry keys, add the \Dependents value and run the following: reg query HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Dependencies\dotnet_apphost_pack_40.68.31213_x64\Dependents /s
Check whether it shows anything like the highlighted value

It's possible there are orphaned references that blocks the underlying MSIs from being removed, this in turn would trigger Microsoft Update that then reoffers the runtime/SDK, etc.
@T3chPers0n101 Try running the following query:
reg query HKLM\SOFTWARE\Classes\Installer\Dependencies /s /d /f "*.NET*5.0.17*"It should drop information similar to the following
Grab anyone of the registry keys, add the
\Dependentsvalue and run the following:reg query HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Dependencies\dotnet_apphost_pack_40.68.31213_x64\Dependents /sCheck whether it shows anything like the highlighted value
It's possible there are orphaned references that blocks the underlying MSIs from being removed, this in turn would trigger Microsoft Update that then reoffers the runtime/SDK, etc.
thanks. Is that in cmd, PowerShell or somewhere else?
cmd or powershell. reg command can run in both
Thanks for much, VS was previously installed and appears this process will resolve the issue. Can I confirm after locating the ....{xxxx-xxxx} string from the reg query. How do I fix the dependency? Thanks @joeloff and @marcpopMSFT you know your stuff!
Assuming you've removed VS, you should be able to just delete the VS dependent keys, e.g. HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Dependencies\dotnet_apphost_pack_40.68.31213_x64\Dependents\VS.{AEF703B8-D2CC-4343-915C-F54A30B90937}, then you should be able to just uninstall .NET from Add/Remove Programs.
Just following up to see if we can close this.
Thanks for checking @joeloff. All dependent keys were deleted, yet .Net was reinstalled.
Did you not uninstall the items after removing the dependent key? Removing the key is what should allow you to uninstall 5.0 completely and then avoid the automatic update from offering again.
Did you not uninstall the items after removing the dependent key? Removing the key is what should allow you to uninstall 5.0 completely and then avoid the automatic update from offering again.
No did the uninstall and then deleted the remaining reg keys. Will remove the keys first then to the uninstall
Hi, have a similar issue with Microsoft .Net Core Version 3.1, but removing the keys and then completing the uninstall is not working. A day or so later .Net returns. Appreciate help in successfully removing this for good.
The process I've tried is:
- Run a script to identify the dependent key
- Deleting the keys from reg edit
- Uninstall .Net Core 3.1
- Deleting the program file folders result - .net is uninstalled for a day or so then re-installs itself.
Deleting files won't help, there would still be records in the MSI database. Do you have automatic updates enabled? You can try running get-windowsupdatelog from a PowerShell prompt. It will drop a txt file on your desktop. You can search through it for .NET Core and grab that part of the log. You should see something similar to this.
2021/06/06 20:26:10.0780600 252 13412 Agent Title = 2021-04 .NET 5.0.5 Update for x64 Client
2021/06/06 20:26:10.0780621 252 13412 Agent UpdateId = 8542E7B4-5D8B-4E45-942A-C75DE36BA892.200
2021/06/06 20:26:10.0780627 252 13412 Agent Bundles 4 updates:
2021/06/06 20:26:10.0780643 252 13412 Agent 734780CB-07E4-44FF-9FA0-F5E0E75B634C.200
2021/06/06 20:26:10.0780658 252 13412 Agent AADFE44F-11AB-46C3-AA78-985B4A1A6601.200
2021/06/06 20:26:10.0780908 252 13412 Agent 5BE2E521-3572-4252-B181-0A097628BABD.200
2021/06/06 20:26:10.0780923 252 13412 Agent 6835FAAC-867C-4E72-B919-6AF4D438D9F8.200
Once we know the UpdateID and bundle GUIDs we should be able to figured out what is triggering the update. For 3.1, the logic was a lot more complex because it would attempt to patch 3.1 installs that originated in VS and if VS was previously installed and orphaned a .NET install, the update is likely detecting that and gets reapplied.
Thanks for the information. Once I have the UpdateID and GUIDs, how is it best to move forward with the uninstall process?
I have the log file and UpdateID (no bundle) and there's no reference to version 3.1, there is a reference to version 3.5.
Can you post the update log? I don't think there should be any personal identifiable information in the log other than the machine name. You can search for DNS name = and strip that out and I can take a look at the log. I was hoping it would list the 3.1 update.
Or alternatively, just post all the lines that contain UpdateId and Bundles entries. Those map back to the different offerings on Microsoft Update and I should be able to identify them that way.
Does the machine have any VS instances installed?
There's an extract related to .NET
2023/05/26 19:20:56.0743590 25456 26572 ComApi Deserialized installable update 2023-05 Cumulative Update Preview for .NET Framework 3.5 and 4.8.1 for Windows 11, version 22H2 for x64 (KB5026515), UpdateID = {11AFE4E0-6B0D-4FD2-84CB-06A528137D04.201} 2023/05/27 04:40:04.4309637 26108 24388 ComApi Deserialized installable update 2023-05 Cumulative Update Preview for .NET Framework 3.5 and 4.8.1 for Windows 11, version 22H2 for x64 (KB5026515), UpdateID = {11AFE4E0-6B0D-4FD2-84CB-06A528137D04.201}
Those are .NET Framework updates. They're unrelated to .NET Core 3.1
I just ran into a somewhat related issue and after investigating I determined that the Dell Optimizer application was reinstalling .NET Runtime after a reboot. In this case it was the desktop runtime. See if you have Dell Optimizer and Dell Optimizer Core installed (Settings-->Apps) and if so uninstall them and you should be able to uninstall .NET runtime and it will not return.
@joshuahipple do you know which version of the desktop runtime it was installing?
The latest version of Dell Optimizer 4.0.310.0, A00 installs the following .NET runtime releases:
Microsoft Windows Desktop Runtime - 5.0.17 (x64) 5.0.17.31219 Microsoft Windows Desktop Runtime - 6.0.10 (x64) 6.0.10.31726
Old issue triage: Is this still happening for you?