-
Notifications
You must be signed in to change notification settings - Fork 9
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
Chocolatey install/update removes *ALL* older SDK versions #42
Comments
Agreed. This is not a good thing. It is normal to require multiple versions of .NET Core SDK to be installed. |
When looking into this I found out the It seems to me that chocolatey is not very well suited to the stupid versioning scheme that is used by Microsoft. Probably the best we could do is deploy separate packages matching the Visual Studio version that it is used for. But I'm not sure if we can use virtual packages for that and how side-by-side packages works for dependencies and strictly speaking the versions are not tight to a Visual Studio version I guess. |
Frankly it'd be better to simply not uninstall at all than have the current behavior. I think that's a serious option: it's a mess to leave behind all those files, but that's probably better than breaking stuff. And as @riezebosch points out, there's no simple way to detect what can go and what needs to stay. Another alternative would be to have multiple choco packages, one for each conceptually major version, but that's a pain too, and breaks the upgrade workflow. |
To be honest, multiple packages may be a better option as in reality, upgrading .NET Core SDKs doesn't really make sense outside of the patch version incrementing. So 2.2.200 should upgrade to 2.2.201, but shouldn't upgrade to 2.3.100 - that should install side-by-side |
What would be cool is virtual package with an exact version match for that.
Maybe I can uninstall only from that package range because of course, you don't need to know the target version for that. Only uninstall packages in current range instead of all. |
As a consumer of packages that makes sense - but I'm not sure how you'd want to implement that, because their numbering scheme isn't semver or anything. Each conceptually major version would need some kind implementation to match all packages in its conceptually major range, and that concept may be tricky enough to cause annoying bugs not to mention be a lot of work to implement. And even then, you'd be making I mean I'd love to see that as a user! But... I'd be content with simply not having build machines break on choco upgrade, and the rest is gravy. |
If you did go to separate packages, then possibly the existing dotnetcore-sdk ones could become virtual ones that pointed to actual separate ones (for people who wanted to keep using dotnetcore-sdk) As it is now, I need to remember to use the If they were separate packages, then the semver would probably work as expected.. eg. given a package named |
Until Microsoft decides to bowl over the versioning scheme once again or they move over to a single update channel on 3.0 ¯_(ツ)_/¯ |
This should probably resolve part of the problem: c7f9796 |
When installing/updating the chocolatey package, ALL older SDK versions are uninstalled.
This includes versions like 2.2.205 which are still required on some machines due to global.json files not rolling up from 2.2.2xx to 2.2.4xx. This is causing a breaking change on install. I understand net core 3 does something similar, but that should only be for versions covered in the same "version" like 2.2.205 install would uninstall all other 2.2.20x versions, not a 2.2.10x version though.
Please note the discussion in the comments section at https://chocolatey.org/packages/dotnetcore-sdk/
The text was updated successfully, but these errors were encountered: