Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Add GraphicalHost assembly to enable Out-GridView, Show-Command, and Get-Help -ShowWindow #10899
Add back GraphicalHost assembly code to enable Out-GridView, Show-Command, and Get-Help -ShowWindow on Windows only.
Some of the original code was changed for updated copyright and some style issues. Because of a difference in the Windows build system vs dotnet msbuild on embedding resources, had to change resgen to work with what XAML expects. I would focus the code review on source code that was already in this repo that had to be changed to make this work. The original WPF code is largely unchanged except where needed to get it to compile.
No automated tests so I did some manual validation for all three commands.
In the future, we'll probably want to split this out as a separate module, but currently part of the code is in SMA.dll and the rest is in GraphicalHost.dll. Removing the SMA.dll code is not trivial as we need to expose new public APIs for the module in how the cmdlet talks to the WPF window. Also the cmdlet is part of Utility module which is a breaking change in itself.
Note the source folder is the namespace name as resgen uses that to produce the path to the resources and the code expects that path.
Maybe add original code in first PR and then add new commits in follow PRs? It is simplify code review.
@iSazonov I'm ok deferring the code cleanup. However, it's a large amount of code. I'd rather focus this effort on the changes to files outside of the graphicalhost code base since that code base is from Windows PowerShell and has been working for some time. I don't want to invest in improving GraphicalHost, this is purely a parity with Windows PowerShell effort. I'd rather invest in a cross platform version of the tools over time.
@SteveL-MSFT please resolve merge conflict.
Also, open a PR in the PowerShell-Native repo to add the new assembly in the trusted assemblies list: