core icon indicating copy to clipboard operation
core copied to clipboard

KB5009193 and KB5009194 forcefully install .NET Core 3 and 5 via Microsoft Update even though there's nothing to update

Open conioh opened this issue 4 years ago • 15 comments

Description

Following the resolution of #7093 etc. there's a new problem I mentioned earlier but is distinct from the installation error issue there.

Even though I don't have .NET Core 3 or 5 installed at all, Microsoft Update still forcefully pushed unto me KB5009193 (2021-12 .NET Core 3.1.22 Security Update for x64 Client) and KB5009194 (2021-12 .NET 5.0.13 Security Update for x64 Client).

I stress again, before this execution of Microsoft Update I had no runtime and no SDK of .NET Core 3 or 5. So this was not an update but rather a forced install.

This is not the documented and intended behavior described in https://devblogs.microsoft.com/dotnet/net-core-updates-coming-to-microsoft-update/

Updates with both security and non-security fixes for all supported versions of .NET Core (currently .NET Core 2.1, .NET Core 3.1 and .NET 5.0) will be available on MU. These updates will target the .NET Core SDK, .NET Core Runtime, ASP.NET Core Runtime, and the .NET Core Desktop Runtime installers deployed either independently or as part of another application. .NET Core runtime binaries included with an application built as a self-contained deployment will not be updated by MU.

These updates will be installed via Microsoft Update to computers with a Client operating system that have a supported major/minor version such as .NET Core 2.1, 3.1 or .NET 5.0 already installed.

etc., and in the comments Jamshed Damkewala, Principal Engineering Manager, .NET, explicitly said in response to question that Microsoft will not push new versions of .NET but rather will only update already installed versions (emphasis mine):

We have no current plans to make new major and minor updates available via MU. Servicing updates for 5.0 will only be offered if you install 5.0 yourself. We will not push 5.0 down to your computer if you did not already have this. Also remember new major and minor releases will always remain side by side installs with previous versions, which means if you have 5.0.1 installed and we ship a 5.1 or 6.0 then your 5.0.1 will not be replaced by 5.1 or 6.0. Even if we decide to make new major/minor updates available via MU they will not replace your the major/minor so there should be no compatibility issues due to that. Applications can choose if they want to roll forward to a new major or minor update automatically, but by default they only roll forward to a new servicing update within the same major/minor version.

Unfortunately this is not what I'm seeing

Configuration

  • Windows 11 Enterprise x64 build 22000.434
  • Visual Studio 2022 (with .NET 6 SDK)
  • No other version of .NET installed prior to the Microsoft Update

image

Regression?

Not sure.

Other information

Once I remove the BlockMU values from the screenshot above and Check for updates I get KB5009193 and KB5009194.

image

image

The only workaround is to use the BlockMU Registry value which is not really a good workaround, since if someday for whatever reason I install .NET 5 I would like it to be updated. I just don't want it to installed from scratch when there's nothing to update.

conioh avatar Jan 11 '22 23:01 conioh

CC @rbhanda

buyaa-n avatar Jan 11 '22 23:01 buyaa-n

@conioh, on behalf of the team that ships .NET Core updates on Microsoft Update I can positively assert that we do not push .NET Core updates via MU to computers that do not already have .NET Core installed. We do not offer this even when the BlockMU reg key is not deployed.

It is more likely you do have .NET Core installed without realizing it. For e.g. do you have Visual Studio on this computer? If so you have .NET Core (and probably multiple versions) of Core installed under VS. In this case you would not see it in Add Remove Programs and might assume its not installed when it is.

If you still have a machine in this state (where you think .NET Core is not installed) I suggest you go to the C:\Program Files\dotnet\shared folder and run dotnet.exe --info. If you have any versions installed they should be listed. If the computer already got the MU update then this would not be a good test obviously.

jamshedd avatar Jan 12 '22 03:01 jamshedd

@jamshedd, I would think that my post was very clear. I don't see how you could miss that I wrote that I have Visual Studio 2022 installed, with .NET 6 SDK, but not any other version, and the screenshots that show that I ran dotnet.exe --list-runtimes and dotnet.exe --list-sdks.

If you think dotnet.exe --info would give different information, have fun:

https://user-images.githubusercontent.com/10606081/149182807-11d32432-5044-4ce9-8f1d-75232a749721.mp4

It is far more likely that either dotnet.exe is lying or that the checker for the updates is broken and thinks something is installed even though it isn't.

conioh avatar Jan 12 '22 16:01 conioh

@conioh, I did miss the fact that you called out you have VS 2022 installed, sorry about that. This is definitely not expected, so if you have a machine in this state (where continues to offer updates for versions you think you should not have) can you run some diagnostics for us so we can see what is going on?

• Run http://aka.ms/vscollect.exe and share the resulting vslogs.zip that is created in %temp% • Run the powershell cmdlet Get-WindowsUpdateLog and share the resulting windowsupdate.log file that is created on your desktop

jamshedd avatar Jan 12 '22 18:01 jamshedd

@jamshedd, I've collected the data. Is there a private way to send it? I'm not sure what's included there so I prefer not to share them publicly.

conioh avatar Jan 12 '22 23:01 conioh

@jamshedd, I've collected the data. Is there a private way to send it? I'm not sure what's included there so I prefer not to share them publicly.

Thanks, @conioh! If the files are not too big, can you email them to charitys_at_microsoft_dot_com who is helping investigate?

/cc @csnellgrove1

jamshedd avatar Jan 13 '22 00:01 jamshedd

Thank you, I've sent the logs.

conioh avatar Jan 14 '22 13:01 conioh

I'm very glad I'm not the only one having this issue. I have only .NET 6 Desktop Runtime installed, not even SDKs. However, after looking for updates via Microsoft Update, I have the following output of dotnet.exe --info:

.NET runtimes installed: Microsoft.NETCore.App 5.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 5.0.4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 5.0.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

And a pending KB5009194 security update for that version I never installed, and in fact, actively uninstalled.

(On Windows 11 Pro 22000.434 that is)

Elsensee avatar Jan 19 '22 17:01 Elsensee

I'm very glad I'm not the only one having this issue. I have only .NET 6 Desktop Runtime installed, not even SDKs. However, after looking for updates via Microsoft Update, I have the following output of dotnet.exe --info:

.NET runtimes installed: Microsoft.NETCore.App 5.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 5.0.4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 5.0.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

And a pending KB5009194 security update for that version I never installed, and in fact, actively uninstalled.

(On Windows 11 Pro 22000.434 that is)

If you are seeing the 5.0.6 version installed (per your comment above) then MU offering KB5009194 (which corresponds to 5.0.13) makes sense - it is a security patch applicable for all 5.0 versions between 5.0.0 and 5.0.12.

Q - what versions of VS did you previously have at any point and do you currently now on this machine?

jamshedd avatar Jan 21 '22 02:01 jamshedd

I'm seeing the same thing. I've ran the dotnet-core-uninstall tool, removed everything 3.* and 5.* from Programs. Here's what I'm seeing from both the x86 and x64 dotnet tool:

image

Likewise, this is what dotnet-core-uninstall reports:

image

When I check for updates, 3.1.22 and 5.0.14 get reinstalled.

image

This normally wouldn't be a problem. Unfortunately, my Blazor debugging completely breaks in VS Code when either of these are installed. I've tested this over and over again. Uninstall 3.1.22 and 5.0.14, debugging works. Reinstalls, it breaks. Breaking is defined mostly as the app never launches, I can't set breakpoints, I can't stop debugging and the language service seems to hang on saving files. I know that's outside of the scope of this thread, I'm just adding context.

jackmusick avatar Feb 22 '22 15:02 jackmusick

@csnellgrove1 can you please take a look to see what's going on?

jamshedd avatar Feb 23 '22 04:02 jamshedd

Yep I can take a look. @jackmusick can you please use the log collection tool to send me the logs so I can see why offering is triggering for you?

Here are the steps for collecting setup logs:

  1. Download collect.exe tool, by navigating to http://aka.ms/vscollect
  2. Open admin command prompt and run this tool – it will create a ZIP file with setup logs in %TEMP%
  3. Get the windowsupdate.log file by opening powershell, and running command Get-WindowsLog
  4. This will generate the windowsupdate.log file and save it to your desktop
  5. Please send the zip file and the windowsupdate.log file to @.***

Thank you!


From: Jamshed Damkewala @.> Sent: Tuesday, February 22, 2022 8:08 PM To: dotnet/core @.> Cc: Charity Snellgrove @.>; Mention @.> Subject: Re: [dotnet/core] KB5009193 and KB5009194 forcefully install .NET Core 3 and 5 via Microsoft Update even though there's nothing to update (Issue #7109)

@csnellgrove1https://github.com/csnellgrove1 can you please take a look to see what's going on?

— Reply to this email directly, view it on GitHubhttps://github.com/dotnet/core/issues/7109#issuecomment-1048432484, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AO2ZLY5FPSP3TXXCYTJTJATU4RMU5ANCNFSM5LXQ4PBQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you were mentioned.Message ID: @.***>

csnellgrove1-zz avatar Feb 23 '22 15:02 csnellgrove1-zz

I have the vscollect logs, but I don't recognize "Get-WindowsLog" as a valid command (or see anything on Google the references a module to install to use it). The email address is also hidden in your comment.

jackmusick avatar Feb 23 '22 16:02 jackmusick

Oops sorry about that, it’s Get-WindowsUpdateLog and the email address is charitys at microsoft dotcom

Get Outlook for iOShttps://aka.ms/o0ukef


From: Jack Musick @.> Sent: Wednesday, February 23, 2022 8:07:36 AM To: dotnet/core @.> Cc: Charity Snellgrove @.>; Mention @.> Subject: Re: [dotnet/core] KB5009193 and KB5009194 forcefully install .NET Core 3 and 5 via Microsoft Update even though there's nothing to update (Issue #7109)

I have the vscollect logs, but I don't recognize "Get-WindowsLog" as a valid command (or see anything on Google the references a module to install to use it). The email address is also hidden in your comment.

— Reply to this email directly, view it on GitHubhttps://github.com/dotnet/core/issues/7109#issuecomment-1048944530, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AO2ZLY644ZNFZQUS6HPWS2LU4UA4RANCNFSM5LXQ4PBQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you were mentioned.Message ID: @.***>

csnellgrove1-zz avatar Feb 23 '22 16:02 csnellgrove1-zz

Sent. Thank you!

jackmusick avatar Feb 23 '22 16:02 jackmusick