/
WinUIDesktopSample.csproj
49 lines (44 loc) · 2.25 KB
/
WinUIDesktopSample.csproj
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
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
<DefineConstants>DISABLE_XAML_GENERATED_MAIN</DefineConstants>
<ApplicationManifest>WinUIDesktopSample.exe.manifest</ApplicationManifest>
<!--
There seems to be a codegen bug when referencing the cswinrt interop assembly of the Win32XamlHost
project. Since we don't really need those metadata providers yet, this is just an easy workaround
-->
<XamlCodeGenerationControlFlags>DoNotGenerateOtherProviders</XamlCodeGenerationControlFlags>
<Platforms>x86;x64</Platforms>
<SimulateCsWinRTNugetReference>true</SimulateCsWinRTNugetReference>
<CsWinRTEnabled>false</CsWinRTEnabled>
<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
</PropertyGroup>
<ItemGroup>
<Manifest Include="WinUIDesktopSample.exe.manifest">
<DeploymentContent>true</DeploymentContent>
</Manifest>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.VCRTForwarders.140" Version="1.0.6" />
<ProjectReference Include="..\..\Projections\Windows\Windows.csproj" />
<ProjectReference Include="..\..\Projections\WinAppSDK\WinAppSDK.csproj" />
<!--
Exclude compile time assets so we don't pick up the interop assembly from the WinAppSDK Nuget
since we are building our own in our WinAppSDK projection project
-->
<PackageReference Include="Microsoft.WindowsAppSDK" Version="$(MicrosoftWinAppSDKVersion)" GeneratePathProperty="true">
<ExcludeAssets>compile; runtime</ExcludeAssets>
</PackageReference>
</ItemGroup>
<!--
In additon to excluding the WinUI interop assembly above, also need to exclude
its transitive Microsoft.Windows.CsWinRT Nuget's winrt.runtime.dll assembly.
But PackageReference metadata doesn't appear to support that, so removing it here.
-->
<Target Name="RemoveTransitivePackageAssets" AfterTargets="ResolvePackageAssets">
<ItemGroup>
<RuntimeCopyLocalItems Remove="@(RuntimeCopyLocalItems)" Condition="'%(RuntimeCopyLocalItems.NugetPackageId)' != '' And $([System.String]::Copy(%(RuntimeCopyLocalItems.NugetPackageId)).Contains('Microsoft.Windows.CsWinRT'))" />
</ItemGroup>
</Target>
</Project>