-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Visual Studio Installer removes 8.0 SDK #45241
Comments
I had this happen too, using VS2022 Enterprise. I would have been on a late 17.11 release beforehand. |
This has been our practice for many releases now - the thinking is that since SDKs can target any TFM users should have the most up to date tooling at all times. You can still create net8.0 libraries and applications using this SDK, can you clarify what other problems the 9 SDK introduced from your point of view? |
Several projects request the SDK version including the patch number, i.e. "8.0.0". They do not build with the 9 SDK unless this is relaxed to "8.0" - which still feels counterintuitive. (For curiosity: Why has the 6.0 SDK not been uinstalled, too?) |
And a project under that kind of It's not a very big deal, because it take only a few seconds to download and re-install 8.0. |
Thanks for the details! Is it fair to say that you expect all the tooling you use to adhere to your global.json? |
I stripped the project path from the issue description. I tried to compile https://github.com/gitextensions/gitextensions, which used to work all the years before. |
I suppose in general terms it's fair to say that I expect It's moot whether it's the libraries or the tooling which cause breakage. If the tools didn't adhere to |
For future reference, VS ships with and is intended to be compatible with specific versions of the SDK, as documented here: https://learn.microsoft.com/en-us/dotnet/core/porting/versioning-sdk-msbuild-vs#lifecycle For best results these versions should be kept in sync. We are hoping to work on decoupling VS and the SDK a bit more, but at the moment there is a fairly tight coupling. |
It is fair to expect the update to an IDE not to mess the whole dev environment, yes. The current VS behaviour of uninstalling the SDKs is rather disturbing. |
Here's how this works (or is supposed to): If Visual Studio installs the .NET SDK, then that SDK is "owned" by VS, and when VS updates to a newer SDK it will uninstall the old one. Otherwise, over time VS would leave a bunch of .NET SDK installs behind. If you install the SDK outside of VS (even if it's the exact same version that VS already installed), then that version won't be uninstalled when you update VS (the installs are ref-counted). So if you pin a version in global.json, you should install that version with the standalone .exe installer, so VS won't uninstall it out from under you. @baronfel @marcpopMSFT Do we have this documented in a good place? Note: The original issue said that VS uninstalled "all" versions of 8.0. I would only expect there to be one VS-managed version of the .NET SDK, and at most one version to be uninstalled by VS during an upgrade. If there were multiple 8.0 versions installed side-by-side and more than one of them was uninstalled, then it's possible something else is going on. |
@dsplaisted @baronfel here's a doc update that calls out this behavior specifically: dotnet/docs#43866 It's still not clear to me why customers are willing to update their VS which is their development environment but draw the line at the SDK which is only a small portion of the tools used when developing in VS. |
@willdean if you don't mind sharing what is broken with dotnet watch with @tmat or filing a separate issue for that, that would be helpful: #45241 (comment) |
Have you ever tried to bisect, i.e. to build older commits? I primarily see VS as an IDE, i.e. a GUI. An update of a (powerful) editor shall not require changes to existing code - at least not in minor updates. |
I appreciate the context. Visual Studio is not just a GUI though as if you're building in VS, you're getting an updated compiler, msbuild, nuget, and testing tools that all come with the VS install. So you're already updating 80% of your development tools even if you don't think of it that way. I think you're right that some customers don't realize or see it that way and hence wanting to stay on an older SDK even when they are updating all the rest of their development tools. |
All the deleted SDKs were part of the VS installation (see https://dotnet.microsoft.com/en-us/download/dotnet/8.0), so it's by design. |
There are a number of bugs open already both here and in the aspnet repo about dotnet watch with Blazor - I think there are several fixes coming. |
We just experienced this too upgrading from VS 17.10.9 to VS 17.12.3 It removed .Net 8 SDK that our source code targets. We do not have plans to shift framework until .Net 10 and even at that point we would still need to build older branches that keep targeting .Net 8. We try to stay up-to-date with Visual Studio versions, but usually only jumps to the next LTS version, but we do expect to be able to keep targeting existing .Net version between updates. Is .Net 8 really an older SDK? I believe that it has support until November 2026. |
Just download the 8 SDK and install it in addition. |
Describe the bug
I have updated the Visual Studio Community 2022 to 17.12.2 using the Visual Studio Installer.
This has deinstalled all instances of the 8.0 SDKs.
The remaining SDKs are 6.0.428 and (the new) 9.0.100.
This occurred on 2 of 2 machines.
To Reproduce
Exceptions (if any)
> dotnet build
Further technical details
The text was updated successfully, but these errors were encountered: