Skip to content
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

Breaking Change to .NET Packages on Winget #7428

Open
mthalman opened this issue May 5, 2022 · 8 comments
Open

Breaking Change to .NET Packages on Winget #7428

mthalman opened this issue May 5, 2022 · 8 comments

Comments

@mthalman
Copy link
Member

mthalman commented May 5, 2022

Breaking Change to .NET Packages on Winget

The Microsoft .NET team plans to make a set of breaking changes to the .NET packages that are available through the Windows Package Manager tool (winget). Existing .NET packages that are currently community maintained will be replaced by new packages with different package identifiers. This new set of packages will be officially supported by the .NET team and conform to a consistent naming convention.

Removal of Existing Winget Packages

A variety of .NET winget packages have been defined by the community. These are not consistently defined and do not conform to naming and versioning conventions used by the .NET product. These packages should be considered deprecated and will be removed and replaced by packages that are exclusively maintained by the .NET team.

The following packages are deprecated and will be removed:

Dependencies on Existing Packages

There are a set of packages that have dependencies on the above .NET packages to be removed. To avoid breaking these dependent packages, their dependencies will be updated to the new replacement packages before the deprecated ones are removed.

This is the set of packages which will have their dependencies updated:

  • HandBrake.HandBrake
    • Current Dependencies:
      • Microsoft.dotnetRuntime.5-x64
      • Microsoft.dotnetRuntime.6-x64
    • New Dependencies:
      • Microsoft.DotNet.Runtime.5
      • Microsoft.DotNet.Runtime.6
  • Iriun.IriunWebcam
    • Current Dependencies:
      • Microsoft.dotnetRuntime.3-x86
    • New Dependencies:
      • Microsoft.DotNet.Runtime.3_1
  • LINQPad.LINQPad.6
    • Current Dependencies:
      • Microsoft.dotnetRuntime.3-x64
    • New Dependencies:
      • Microsoft.DotNet.Runtime.3_1
  • LINQPad.LINQPad.7
    • Current Dependencies:
      • Microsoft.dotnetRuntime.6-x64
      • Microsoft.dotnetRuntime.6-x86
    • New Dependencies:
      • Microsoft.DotNet.Runtime.6
  • Microsoft.PowerToys
    • Current Dependencies:
      • Microsoft.dotnetRuntime.3-x64
    • New Dependencies:
      • Microsoft.DotNet.Runtime.3_1
  • rocksdanister.LivelyWallpaper
    • Current Dependencies:
      • Microsoft.dotnetRuntime.3-x86
    • New Dependencies:
      • Microsoft.DotNet.Runtime.3_1
  • VMware.HorizonClient
    • Current Dependencies:
      • Microsoft.dotnetRuntime.5-x86
    • New Dependencies:
      • Microsoft.DotNet.Runtime.5

New .NET packages

The .NET team will be replacing the previously mentioned community-maintained packages with a new set of packages with different package identifiers. These packages will be maintained by the .NET team and kept up to date as part of each servicing release for each of the supported .NET versions.

These are the package identifiers of the new set of packages to be added:

  • Microsoft.DotNet.AspNetCore.3_1
  • Microsoft.DotNet.AspNetCore.5
  • Microsoft.DotNet.AspNetCore.6
  • Microsoft.DotNet.AspNetCore.Preview
  • Microsoft.DotNet.DesktopRuntime.3_1
  • Microsoft.DotNet.DesktopRuntime.5
  • Microsoft.DotNet.DesktopRuntime.6
  • Microsoft.DotNet.DesktopRuntime.Preview
  • Microsoft.DotNet.HostingBundle.3_1
  • Microsoft.DotNet.HostingBundle.5
  • Microsoft.DotNet.HostingBundle.6
  • Microsoft.DotNet.HostingBundle.Preview
  • Microsoft.DotNet.Runtime.3_1
  • Microsoft.DotNet.Runtime.5
  • Microsoft.DotNet.Runtime.6
  • Microsoft.DotNet.Runtime.Preview
  • Microsoft.DotNet.SDK.3_1
  • Microsoft.DotNet.SDK.5
  • Microsoft.DotNet.SDK.6
  • Microsoft.DotNet.SDK.Preview

Implementation Timeline

  1. Publish new .NET packages (Date: May 11, 2022)
  2. Create PRs to update dependencies to reference the new .NET packages instead of the deprecated ones (Date: May 11, 2022)
  3. Remove the deprecated .NET packages (Date: May 18, 2022)

Package Installation Instructions

In order to avoid compatibility issues, you must clean your machine of any existing .NET winget packages that are listed for removal prior to installing the new .NET packages.

Once you've installed the new .NET packages, upgrade will not work for those packages until a new winget feature is available. To work around this issue, you'll need to force an upgrade to the specific version that you want:

winget upgrade <package-id> --force --version <desired-version>
@denelon
Copy link

denelon commented May 5, 2022

One caveat here is the Windows Package Manager does not yet support dependencies in the client. We are performing some validation on dependencies reported in manifests. Mainly, we're validating they exist in the repository. Performing the "add" before "remove" will ensure the manifests aren't pointing to non-existent dependencies, but there is no current logic in the released "stable" client to handle them.

Related to:

@lychichem
Copy link

now powertoys depends on net 6

@jedieaston
Copy link

Are the back versions of .NET SDK being added or only the latest ones? I know some projects I've worked on have strict global.json files that prevent using newer SDKs (even patch versions).

@mthalman
Copy link
Member Author

Are the back versions of .NET SDK being added or only the latest ones? I know some projects I've worked on have strict global.json files that prevent using newer SDKs (even patch versions).

@jedieaston - We'll include the latest patch version of each of the SDKs. For example, for .NET 6 we have SDKs published for 6.0.105, 6.0.203, and 6.0.300.

Does that provide what you're wanting?

@jedieaston
Copy link

That's probably fine, although I work on projects sometimes that have rollForward: disable set in their global.json file (meaning I need the exact SDK version to be installed). I should probably tell them to remove that because it means I have like six SDK versions installed at once, but on the other hand it would be nice to be able to install each specified version via winget rather than having to go to the browser when setting up a new machine.

So, in conclusion, don't do the extra work on my account :) (I'd just prefer in the future that you didn't remove intermediate versions unless there's a good reason, as most other packages in the repo do)

@mthalman
Copy link
Member Author

The intention is to not remove any versions going forward. This was a breaking change to just get us to a stable and consistent point.

@lychichem
Copy link

lychichem commented May 25, 2022

Related issue: microsoft/winget-pkgs#61981 @denelon @mthalman

@drraghavendra
Copy link

Please have a look at this code might help you
Winget.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants