microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
22.58k stars 1.4k forks source link

Cannot pin Microsoft.Teams.Classic #4339

Open otto-liljalaakso-nt opened 3 months ago

otto-liljalaakso-nt commented 3 months ago

Brief description of your issue

I have Microsoft Teams installed (by default). It shows up during winget upgrade --all in section The following packages have an upgrade available. Since I have moved to the new teams already quite some time ago, I do not use Teams Classic at all, and I also do not want to manage its updates, because it was installed by default and should be managed by my organization rather than me. In order to spare me from that notification every time I try to upgrade the packages I have installed myself, I attempted to pin that package. Strangely, winget pin add Microsoft.Teams.Classic does not work, even though this method worked for another package (Discord.Discord) I wanted to hide using the same method.

As a workaround, pinning using package name works:

> winget pin add "Microsoft Teams classic"
Found Microsoft Teams classic [Microsoft.Teams.Classic]
Pin added successfully

Steps to reproduce

Precondition: Have Microsoft.Teams.Classic installed in old version:

> winget upgrade
No installed package found matching input criteria.

The following packages have an upgrade available, but require explicit targeting for upgrade:
Name                    Id                      Version      Available   Source
-------------------------------------------------------------------------------
Microsoft Teams classic Microsoft.Teams.Classic 1.6.00.29964 1.7.00.7956 winget
  1. Try to pin it with winget pin add Microsoft.Teams.Classic

Expected behavior

Pin is added and is visible with winget pin list.

Actual behavior

> winget pin add Microsoft.Teams.Classic
No installed package found matching input criteria.
> winget pin list | rg Micrsoft.Teams.Classic
(no output)

Environment

> winget --info
Windows Package Manager v1.7.10861

Windows: Windows.Desktop v10.0.22631.3374
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.22.10861.0

I already have Microsoft.Teams Teams Machine-Wide Installer pinned for similar reasons.

github-actions[bot] commented 3 months ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

otto-liljalaakso-nt commented 3 months ago

Thanks, bot. The issue you found is similar in that:

  1. It is about pinning Microsoft Teams and
  2. There is a workaround that uses package name instead of ID.

But there are also differences:

  1. It is about a package with different ID (Microsoft.Teams.Classic here vs. Microsoft.Teams in that issue)
  2. In that issue, there are two different packages with the same ID installed, whereas here I only see one.

So, I think these are similar but not duplicates. Somebody with knowledge of what is going on internally may be able to judge that the root cause is the same. In that case, please mark this issue as the duplicate of that one.

denelon commented 3 months ago

I'll leave this one independent for now. We've just released a preview to handle some of the Side-By-Side scenarios better, but I think this may also be related to Area-Matching.

denelon commented 2 days ago

Is this still a problem on WinGet 1.8?