-
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
Dotnet SDK auto-updates in Windows #7457
Comments
@richlander PTAL |
Good question. I'll ask. Do you know that you can roll-forward on patch version. Is that acceptable to you? |
@drk-mtr, we do provide the ability to not receive MU updates for .NET so you dont need to block all other updates. Take a look at this blog post about .NET updates coming to MU, and specifically the section on blocking these updates. |
I read SDK vs Runtime not .NET vs no .NET. |
Thanks for the responses all, really appreciated! @jamshedd Thanks - I have applied that registry change and will keep an eye on what happens. I'm not clear on whether this relates to the runtimes, the SDKs or both. @richlander |
@drk-mtr The registry entries applies to a specific update bundle, e.g. updates for .NET 6.0 or .NET 5.0. It doesn't allow for partially blocking specific components (child packages of the update bundle) like the SDK or one of the runtimes. For CI scenarios, the zip copies of the SDK/runtime can be useful. For example, when we build the SDK itself, we acquire and create a local install of the runtime that won't get patched by MU, so we can retain full control, especially since we have tests that we want to run on older runtimes, e.g. we have tests for backwards compatibility for 3.1 and 5.0 when building the 6.0 SDK. |
I would add that our recommendation is that customers use the default roll-forward options with global.json which is Patches of the SDK do not contain breaking changes and every change is reviewed and approved individually. For the most part, the changes that are approved are high impact or security in nature. You're right that it's possible for something to slip through that we missed but I'm not generally aware of that happening to the patch releases. So using the default and pinning to a specific SDK feature band will keep you up to date with security fixes in the runtime and tools but limit your exposure to any riskier changes. Some more details on our versioning can be found here If you do want more control, Jacques suggestion of using the file-based installs will work but note that you'll be responsible for updating at that point and so could end up building with missing security fixes. |
Thanks again all! Lots of good info here - I'll have a play and will most likely recommend |
I've just started having a play around and I've realised that using The ideal for me would be that the build agents have multiple versions of the latest LTS available by default i.e. latestPatch, latestFeature and latestMinor. This would avoid additional (potentially time-consuming) steps to copy across zips, or tasks to install a different SDK during build. Using |
Can you elaborate? I'm not following. |
Unfortunately that's exactly what happened with 7.0.202. See dotnet/runtime#83526. It contained a change that actually broke assembly loading for me, which means I'm stuck on 7.0.201 for the time being. Thankfully the registry setting in #7457 (comment) works beautifully and I no longer have Windows Update trying to uninstall 7.0.201. 😁 |
Which method should I be using for file-based installs? The docs don't mention it. (I can't see a comment by a Jacque in this thread either.)
Similar situation for us. Breaks happen, we'd like repeatable builds across developer machine and build agents by using the exact same version.
I have the same request as the initial request. Can we reopen this issue? |
You can use the install scripts or appropriate binary link on the download page to download the zip/tar files. We currently do not have plans to change the current upgrade behavior of Visual Studio or Windows Update though we constantly reassess as we get feedback. |
I think the current bugged .NET 6 SDK release 6.0.422 illustrates the need for control over the installed SDKs. Every time I reboot my development machine I need to uninstall 6.0.422 and reinstall 6.0.421 because of dotnet/roslyn#73536 as reported by dotnet/roslyn#73510 . |
This is potentially more of a question regarding intended best practices and definitely isn't a bug, so apologies if this is the wrong place to ask.
Our development teams are using .NET 6 on Windows 10. When a new SDK version is released, Windows auto-updates. I don't recall auto-updates being applied before, I believe it was introduced in .NET 5, and this causes issues for us because a new version is not simply added - the old version is replaced. This messes things up when the
global.json
in the project roots specify arollForward
property of disable, to ensure that we're developing using the same versions as our build agents / app servers.I appreciate this is configurable - apparently via the
Receive updates for other Microsoft products when you update Windows
setting in Windows - however I probably want updates for those other products.Is there a recommended way to control this for dotnet SDKs specifically?
The text was updated successfully, but these errors were encountered: