-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathWinUI.Extra.props
More file actions
74 lines (65 loc) · 4.64 KB
/
WinUI.Extra.props
File metadata and controls
74 lines (65 loc) · 4.64 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<Project>
<!--
Extra properties for WinUI projects.
-->
<PropertyGroup>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
<GenerateLibraryLayout>true</GenerateLibraryLayout>
<EnableDefaultPageItems>false</EnableDefaultPageItems>
</PropertyGroup>
<PropertyGroup Condition="'$(IsWinAppSdk)' == 'true' OR '$(IsUwp)' == 'true'">
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<TargetPlatformVersion>10.0.19041.0</TargetPlatformVersion>
</PropertyGroup>
<!-- Workaround, improved error message when consuming from Uno projects with mismatched TFMs -->
<!-- See https://github.com/CommunityToolkit/Windows/issues/388 -->
<ItemGroup>
<None PackagePath="lib/net8.0-windows10.0.18362" Include="$(MSBuildThisFileDirectory)/_._" Pack="true" />
<None PackagePath="lib/net7.0-windows10.0.18362" Include="$(MSBuildThisFileDirectory)/_._" Pack="true" />
</ItemGroup>
<PropertyGroup Condition="'$(IsWinAppSdk)' == 'true'">
<!-- See https://github.com/microsoft/WindowsAppSDK/issues/3842 -->
<UseRidGraph>true</UseRidGraph>
<RuntimeIdentifiers Condition="$([MSBuild]::GetTargetFrameworkVersion('$(TargetFramework)')) >= 8">win-x86;win-x64;win-arm64</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="8 > $([MSBuild]::GetTargetFrameworkVersion('$(TargetFramework)'))">win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
<WindowsSdkPackageVersion>10.0.22621.37-preview</WindowsSdkPackageVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(IsUno)' == 'true'">
<!-- Xaml Trimming: https://platform.uno/docs/articles/features/resources-trimming.html -->
<UnoXamlResourcesTrimming>true</UnoXamlResourcesTrimming>
</PropertyGroup>
<PropertyGroup>
<!-- These suppressions are for references between generated assemblies and that VS can keep in the Error List once resolved -->
<NoWarn>$(NoWarn);WMC1006;CS8034;</NoWarn>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(ToolingDirectory)\GlobalUsings_WinUI.cs" />
</ItemGroup>
<!-- Workaround for Mac: https://developercommunity.visualstudio.com/t/XamarinMac-binaries-are-missing-in-173/10164443#T-N10164676 10/6/22 -->
<ItemGroup Condition=" $(TargetFramework.StartsWith('xamarinmac')) ">
<Reference Include="Xamarin.Mac">
<HintPath Condition="Exists('c:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\Extensions\Xamarin.VisualStudio')">c:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\Extensions\Xamarin.VisualStudio\Xamarin.Mac.dll</HintPath>
<HintPath Condition="Exists('c:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\Extensions\Xamarin.VisualStudio')">c:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\Extensions\Xamarin.VisualStudio\Xamarin.Mac.dll</HintPath>
<HintPath Condition="Exists('c:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\Extensions\Xamarin.VisualStudio')">c:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\Extensions\Xamarin.VisualStudio\Xamarin.Mac.dll</HintPath>
<HintPath Condition="Exists('c:\Program Files\Microsoft Visual Studio\2022\Preview\Common7\IDE\Extensions\Xamarin.VisualStudio')">c:\Program Files\Microsoft Visual Studio\2022\Preview\Common7\IDE\Extensions\Xamarin.VisualStudio\Xamarin.Mac.dll</HintPath>
</Reference>
</ItemGroup>
<!--
Workaround for WindowsAppSdk 1.6
Track https://github.com/CommunityToolkit/Labs-Windows/pull/561#issuecomment-2274727870
-->
<Target Condition="'$(IsWinAppSdk)' == 'true'" Name="CsWinRTRemoveXamlDllReferences" AfterTargets="ResolveTargetingPackAssets;ResolveReferences" BeforeTargets="XamlPreCompile;CoreCompile" Outputs="@(Reference)">
<ItemGroup>
<Reference Remove="@(Reference)"
Condition="'%(Reference.Filename)%(Reference.Extension)' == 'Microsoft.Windows.UI.Xaml.dll'" />
<ReferencePathWithRefAssemblies Remove="@(ReferencePathWithRefAssemblies)"
Condition="'%(ReferencePathWithRefAssemblies.Filename)%(ReferencePathWithRefAssemblies.Extension)' == 'Microsoft.Windows.UI.Xaml.dll'" />
<ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalPaths)"
Condition="'%(ReferenceCopyLocalPaths.Filename)%(ReferenceCopyLocalPaths.Extension)' == 'Microsoft.Windows.UI.Xaml.dll'" />
<ReferencePath Remove="@(ReferencePath)"
Condition="'%(ReferencePath.Filename)%(ReferencePath.Extension)' == 'Microsoft.Windows.UI.Xaml.dll'" />
<RuntimePackAsset Remove="@(RuntimePackAsset)"
Condition="'%(RuntimePackAsset.Filename)%(RuntimePackAsset.Extension)' == 'Microsoft.Windows.UI.Xaml.dll'" />
</ItemGroup>
</Target>
</Project>