Skip getting Windows GUI bit on non-Windows in AppHostShellShimMaker #35600
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.
AppHostShellShimMaker
had an implicit assumption thatResourceUpdater.IsSupportedOS()
was tied to Windows. That is no longer the case as of RC1, resulting inPEUtils.GetWindowsGraphicalUserInterfaceBit
being unnecessarily called on non-Windows when creating a shim.See dotnet/runtime#92344.
This doesn't address the underlying issue around the function not properly handling endianness, but it brings back the previous behaviour where the problematic function isn't called when not needed.
cc @agocke @dotnet/domestic-cat
Customer Impact
When installing a tool on a non-Windows platform, we are unnecessarily trying to get the Windows subsystem bit for a PE image. This exposed a pre-existing issue where the function called did not properly handle endianness and resulted in a failure to install the tool on non-little-endian systems. This was a regression in RC1. See dotnet/runtime#92344.
Testing
Manual.
Risk
Low. This switches the order of a check such that we only try to get the Windows subsystem bit on Windows (instead of always getting it and only using it on Windows).