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

Visual Studio provided .NET SDK is not considered when dependencies need the SDK #4201

Open
colejohnson66 opened this issue Feb 26, 2024 · 4 comments
Labels
Area-Matching Issue related to correlation between installed package and manifest Issue-Bug It either shouldn't be doing this or needs an investigation.

Comments

@colejohnson66
Copy link

colejohnson66 commented Feb 26, 2024

Brief description of your issue

When a package depends on the .NET SDK, the Visual Studio provided copy is not considered. Instead, winget needlessly installs a separate copy of the SDK. winget list does show the Visual Studio copy:

image

The SDK is not matched to Microsoft.DotNet.SDK.8, and the version is also wrong.

Steps to reproduce

  • Install Visual Studio with .NET development
  • Install/update LINQPad from winget
  • Observe winget installing Microsoft.DotNet.SDK.8

image

Expected behavior

winget would consider the Visual Studio provided copy as satisfying the dependency.

Actual behavior

It doesn't.

Environment

Windows Package Manager v1.6.3482
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22631.3155
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.21.3482.0

Winget Directories                 
-----------------------------------------------------------------------------------------------------------------------
Logs                               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Diag…
User Settings                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\sett…
Portable Links Directory (User)    %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User)       %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root              C:\Program Files\WinGet\Packages
Portable Package Root (x86)        C:\Program Files (x86)\WinGet\Packages
Installer Downloads                %USERPROFILE%\Downloads

Links               
---------------------------------------------------------------------------
Privacy Statement   https://aka.ms/winget-privacy
License Agreement   https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage            https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale

Admin Setting                             State
--------------------------------------------------
LocalManifestFiles                        Disabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride                     Disabled
LocalArchiveMalwareScanOverride           Disabled

This comment was marked as off-topic.

@colejohnson66 colejohnson66 changed the title .NET SDK from VS not considered when dependencies need .NET Visual Studio provided .NET SDK is not considered when dependencies need the SDK Feb 26, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage Issue need to be triaged label Feb 26, 2024
@denelon
Copy link
Contributor

denelon commented Feb 26, 2024

The manifest is intentionally displaying 8.0.200 for the user and mapping to 8.2.24.6925 in the registry.

WinGet is essentially ignoring the value in parenthesis in the Display Name for historical reasons (the values can be arbitrary and aren't considered authoritative compared with other registry values). We're working on additional improvements in this area.

@denelon denelon added Issue-Bug It either shouldn't be doing this or needs an investigation. Area-Matching Issue related to correlation between installed package and manifest and removed Needs-Triage Issue need to be triaged labels Feb 26, 2024
@denelon
Copy link
Contributor

denelon commented Feb 26, 2024

LINQPad is declaring a dependency on the .NET SDK. The latest version is the one WinGet is defaulting to. Once the matching issue is resolved, WinGet would still likely attempt to upgrade the .NET SDK in this case (unless the package was pinned).

@colejohnson66
Copy link
Author

Just to clarify: the Visual Studio provided SDK is updated by the Visual Studio Installer, not WinGet1. So updating LINQPad would update Visual Studio? That would be fine with me; I'm just trying to understand how updating it would work.

  1. Technically, it is. WinGet updates Visual Studio through the Visual Studio Installer which, in turn, updates the .NET SDK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Matching Issue related to correlation between installed package and manifest Issue-Bug It either shouldn't be doing this or needs an investigation.
Projects
None yet
Development

No branches or pull requests

2 participants