-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Microsoft.WinGet.Client Any CPU #3622
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
JohnMcPMS
previously approved these changes
Oct 13, 2023
src/PowerShell/Microsoft.WinGet.Client.Cmdlets/Acl/WinGetAssemblyLoadContext.cs
Outdated
Show resolved
Hide resolved
src/PowerShell/Microsoft.WinGet.Client.Engine/Helpers/PackageManagerWrapper.cs
Outdated
Show resolved
Hide resolved
JohnMcPMS
approved these changes
Oct 23, 2023
JohnMcPMS
pushed a commit
to JohnMcPMS/winget-cli
that referenced
this pull request
Nov 8, 2023
Move to Any CPU projects Moves Microsoft.WinGet.Client.Cmdlet and Microsoft.WinGet.Client.Engine to be Any CPU platform binaries. This is in preparation of PSResourceGet (aka PowerShellGet v3) release and addresses microsoft#3501 as $env:PROCESSOR_ARCHITECTURE is not an allowed variable in a psd1. Handle server disconnection Before, we had a static PackageManager object for OOP calls. In the scenario where winget is upgraded, this object will be disconnected, and one would have to close its PowerShell 7 session and open a new one to keep using the cmdlets. This PR creates a wrapper that handles disconnections. Windows PowerShell support Correctly throw NotSupported exception for cmdlets that use winget's COM APIs. For this I had to track down all the types being loaded per command and make sure they get loaded after the constructor of each one. This resulted in some weird cases that I need to pass a string instead of an enum in the virtual methods of some base classes. Fix issue where Microsoft.Win32.Registry.dll was missing. Add Pester tests specifically for Windows PowerShell Expected Layout Microsoft.WinGet.Client\ Format.ps1xml Microsoft.WinGet.Client.psd1 net48\ Microsoft.Win32.Registry.dll Microsoft.WinGet.Client.Cmdlets.dll Microsoft.WinGet.Client.Engine.dll Microsoft.WinGet.SharedLib.dll Newtonsoft.Json.dll Octokit.dll net6.0-windows10.0.22000.0\ Microsoft.WinGet.Client.Cmdlets.dll DirectDependencies\ Microsoft.WinGet.Client.Engine.dll SharedDependencies\ Microsoft.Windows.SDK.NET.dll Microsoft.WinGet.SharedLib.dll Newtonsoft.Json.dll Octokit.dll WinRT.Runtime.dll x64\ Microsoft.Management.Deployment.dll Microsoft.Management.Deployment.winmd WindowsPackageManager.dll winrtact.dll x86\ Microsoft.Management.Deployment.dll Microsoft.Management.Deployment.winmd WindowsPackageManager.dll winrtact.dll I didn't add the native binaries in the Windows PowerShell because they will never be loaded. Additional changes: Remove unnecessary AnyCpu build in AppInstallerCLI.sln Fully remove Microsoft.WinGet.Client tests from AppInstallerCLIE2ETests in favor of Pester tests. Improve Initialize-LocalWinGetModules.ps1 for local development. You can now specify which module to initialize.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Move to Any CPU projects
Moves
Microsoft.WinGet.Client.Cmdlet
andMicrosoft.WinGet.Client.Engine
to be Any CPU platform binaries. This is in preparation of PSResourceGet (aka PowerShellGet v3) release and addresses #3501 as $env:PROCESSOR_ARCHITECTURE is not an allowed variable in a psd1.Handle server disconnection
Before, we had a static PackageManager object for OOP calls. In the scenario where winget is upgraded, this object will be disconnected, and one would have to close its PowerShell 7 session and open a new one to keep using the cmdlets. This PR creates a wrapper that handles disconnections.
Windows PowerShell support
Correctly throw NotSupported exception for cmdlets that use winget's COM APIs. For this I had to track down all the types being loaded per command and make sure they get loaded after the constructor of each one. This resulted in some weird cases that I need to pass a string instead of an enum in the virtual methods of some base classes.
Fix issue where
Microsoft.Win32.Registry.dll
was missing.Add Pester tests specifically for Windows PowerShell
Expected Layout
I didn't add the native binaries in the Windows PowerShell because they will never be loaded.
Additional changes:
Microsoft Reviewers: Open in CodeFlow