forked from microsoft/WinUI-Gallery
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Directory.Build.props
29 lines (25 loc) · 1.99 KB
/
Directory.Build.props
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" Condition="Exists($([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../')))" />
<!-- Building both in the WinUI repo and standalone, WinUIGallery's dependencies now require latest SDKs -->
<PropertyGroup>
<SamplesTargetFrameworkMoniker>net8.0-windows10.0.22621.0</SamplesTargetFrameworkMoniker>
<WindowsSdkTargetPlatformVersion>10.0.22621.756</WindowsSdkTargetPlatformVersion>
<WindowsAppSdkTargetPlatformVersion>10.0.17763.0</WindowsAppSdkTargetPlatformVersion>
<MicrosoftWindowsSDKBuildToolsNugetPackageVersion>10.0.22621.756</MicrosoftWindowsSDKBuildToolsNugetPackageVersion>
</PropertyGroup>
<!-- If we aren't building in the WinUI repo, import the necessary missing props we'd normally pick up from its Directory.Build.props hierarchy -->
<!-- The UseStandalone property allows this to be overridden, in order to buildSamples to build without changing the entire repo -->
<Import Project="Standalone.props" Condition="'$(IsInWinUIRepo)' != 'true' OR '$(UseStandalone)' == 'true'"/>
<!-- Temporary workaround until WinAppSDK 1.5.2 provides fix -->
<Target Name="RemoveConflictingDepsJsonFiles" AfterTargets="GetPackagingOutputs">
<!-- If conflicting build and publish deps.json files exist in this or referenced projects,
use only the publish deps.json files, and remove the corresponding build deps.json files. -->
<ItemGroup>
<_PublishPackagingOutputs Include="@(PackagingOutputs->HasMetadata('CopyToPublishDirectory'))"/>
<_PublishDepsJsonFiles Include="@(_PublishPackagingOutputs)"
Condition="'@(_PublishPackagingOutputs)' != '' and $([System.String]::Copy(%(FileName)%(Extension)).EndsWith('.deps.json'))" />
<PackagingOutputs Remove="@(_PublishDepsJsonFiles)" MatchOnMetadata="TargetPath"/>
<PackagingOutputs Include="@(_PublishDepsJsonFiles)"/>
</ItemGroup>
</Target>
</Project>