-
Notifications
You must be signed in to change notification settings - Fork 123
Expand file tree
/
Copy pathWinUIDesktopSample.csproj
More file actions
53 lines (48 loc) · 2.4 KB
/
WinUIDesktopSample.csproj
File metadata and controls
53 lines (48 loc) · 2.4 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
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.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>
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
<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" />
<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.WinUI" GeneratePathProperty="true">
<ExcludeAssets>compile; runtime</ExcludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Web.WebView2">
<ExcludeAssets>all</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>