Skip to content

Commit

Permalink
Exclude non-Windows runtime binaries from PowerShell Module (#2837)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryfu-msft authored Jan 11, 2023
1 parent bc473ba commit 939e4dd
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)'">
Expand Down

0 comments on commit 939e4dd

Please sign in to comment.