commit 939e4ddb09654fe725bdc0a73bee85fffe348c00
parent bc473baf1b9e622bca486db903ecf83b00f96826
Author: Ryan Fu <69221034+ryfu-msft@users.noreply.github.com>
Date: Tue, 10 Jan 2023 17:33:50 -0800
Exclude non-Windows runtime binaries from PowerShell Module (#2837)
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/PowerShell/Microsoft.WinGet.Client/Microsoft.WinGet.Client.csproj b/src/PowerShell/Microsoft.WinGet.Client/Microsoft.WinGet.Client.csproj
@@ -117,10 +117,13 @@
<Target Name="CopyCoreBinaries" AfterTargets="AfterBuild" Condition="'$(TargetFramework)' == '$(CoreFramework)'">
<ItemGroup>
- <CoreBinaries Include="$(OutputPath)\**\*.*" />
+ <!-- Non-Windows runtime binaries need to be explicitly excluded when building the PowerShell module.-->
+ <CoreBinaries Include="$(OutputPath)\**\*.*" Exclude="$(OutputPath)\runtimes\**" />
+ <WindowsRuntime Include="$(OutputPath)\runtimes\win10*\**\*.*" />
</ItemGroup>
<Message Importance="high" Text="Copying @(CoreBinaries) to '$(PowerShellModuleOutputDirectory)\$(Platform)\Core'" />
<Copy SourceFiles="@(CoreBinaries)" DestinationFolder="$(PowerShellModuleOutputDirectory)\$(Platform)\Core\%(RecursiveDir)" />
+ <Copy SourceFiles="@(WindowsRuntime)" DestinationFolder="$(PowerShellModuleOutputDirectory)\$(Platform)\Core\runtimes\%(RecursiveDir)" />
</Target>
<Target Name="CopyDesktopBinaries" AfterTargets="AfterBuild" Condition="'$(TargetFramework)' == '$(DesktopFramework)'">