microsoft / devhome

The new Dev Home experience for Windows!
https://aka.ms/devhomedocs
MIT License
3.63k stars 323 forks source link

Detect weather an application is already installed on the users computer. #1338

Open Captain-Quack opened 1 year ago

Captain-Quack commented 1 year ago

Suggested new feature or improvement

I already have Visual Studio 2022, but there is also an option to install it. It would be very convenient to already have the application do the chore of connecting existing tools to itself during installation.

Scenario

Person A has watched the cool video for Dev Home, and installs it. He already has a bunch of the developer tools installed, and doesn't want to deal with linking them to the app.

Additional details


Edit: After scrolling through the whole list, it seems like it already "knows" if I have apps like notepad++, power toys, or 7-Zip, but not Visual Studio or Unity. Bug perhaps?

adrastogi commented 1 year ago

Related issue: #771

AmelBawa-msft commented 1 year ago

@Captain-Quack, possibly related to the issue that @adrastogi linked? Is the visual studio / Unity installed edition identical to the one suggested by Dev Home, or possibly another edition? You can also use this command to check the installed packages (output packages from this command should be marked as installed in Dev Home):

winget list visualstudio
Captain-Quack commented 1 year ago

@AmelBawa-msft that's likely the issue. Winget returned version 17.7.0, and Dev Home version is 17.6.5.

AmelBawa-msft commented 1 year ago

Visual Studio 17.7.0 is a preview release which seems to be a different package from the 17.6.5 release one. From Dev Home, if you search for Microsoft.VisualStudio.2022.Community, I'd expect two results, and one of the two is marked as installed (from previous comment, the one reported by winget list visualstudio is marked as installed, hence the preview release). Would it be possible to validate the expected output above?

Edit: Adding references for the winget-pkgs YAML manifests:

From WinGet

PS C:\> winget search Microsoft.VisualStudio.2022.Community
Name                                 Id                                            Version Source
--------------------------------------------------------------------------------------------------
Visual Studio Community 2022         Microsoft.VisualStudio.2022.Community         17.6.5  winget
Visual Studio Community 2022 Preview Microsoft.VisualStudio.2022.Community.Preview 17.7.0  winget

From Dev Home

image

Captain-Quack commented 1 year ago

Sorry for the delay. Yes, it does show in dev home that the preview is installed, when you search it up:

image

I also realize that the preview version is a different executable then the normal visual studio, which could explain two different results showing up (?)