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

.net winget config issue #140

Closed
gkulin opened this issue Dec 12, 2024 · 5 comments
Closed

.net winget config issue #140

gkulin opened this issue Dec 12, 2024 · 5 comments

Comments

@gkulin
Copy link
Member

gkulin commented Dec 12, 2024

Brief description of your issue

Trying to install using the .net winget config and running into an error:

Image

Steps to reproduce

WinGet-2024-12-12-08-41-28.452.zip

Expected behavior

to successfully install .net

Actual behavior

failing to install

Environment

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

Windows: Windows.Desktop v10.0.22631.4602
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.24.25200.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
ProxyCommandLineOptions                   Disabled
DefaultProxy                              Disabled
@denelon
Copy link
Contributor

denelon commented Dec 12, 2024

@gkulin can you share the output of winget --info? That would help me troubleshoot and isolate where the bug is.

Thanks for reporting this!

@gkulin
Copy link
Member Author

gkulin commented Dec 12, 2024

@denelon here it is!

> winget --info

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

Windows: Windows.Desktop v10.0.22631.4602
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.24.25200.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
ProxyCommandLineOptions                   Disabled
DefaultProxy                              Disabled

@JohnMcPMS
Copy link
Member

JohnMcPMS commented Dec 13, 2024

I can repro in a sandbox via winget, but manually using PowerShell with the modules is working. I did publish a preview DSC module yesterday, which is what is likely the issue.

One thing that definitely does work is to remove the allowPrerelease from all of the configuration units in the file. You may also have to clear %LOCALAPPDATA%\Microsoft\WinGet\Configuration\Modules to ensure that the preview module isn't present.

@JohnMcPMS
Copy link
Member

JohnMcPMS commented Dec 13, 2024

I have further tracked it to being a conflict between the versions of the WinRT.Runtime.dll shipped with the winget package (Microsoft.DesktopAppInstaller) and the Microsoft.WinGet.Client PowerShell module. Investigating what options we have to resolve this. In the meantime, the mitigations are:

  1. Avoid using the prerelease module as suggested above.
  2. Use the Microsoft.WinGet.Configuration preview module (which I would expect has similar issues due to that dll)

[Edit] CsWinRT issue: microsoft/CsWinRT#1371

@gkulin
Copy link
Member Author

gkulin commented Dec 13, 2024

thanks @JohnMcPMS I cleared %LOCALAPPDATA%\Microsoft\WinGet\Configuration\Modules and used an updated config file from Claudia that removed the allowPrerelease and that fixed the issue!

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

No branches or pull requests

3 participants