Skip to content

Commit 7125984

Browse files
committed
Fix sample build errors
1 parent 0b9a0d4 commit 7125984

File tree

8 files changed

+128
-4
lines changed

8 files changed

+128
-4
lines changed

src/WinUIExSample/LogWindow.xaml.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
namespace WinUIExSample;
1+
using System.Linq;
2+
using Microsoft.UI.Xaml;
3+
4+
namespace WinUIExSample
25
{
36
/// <summary>
47
/// An empty page that can be used on its own or navigated to within a Frame.
@@ -27,4 +30,4 @@ internal void UpdateLog()
2730
}
2831
}
2932
}
30-
}
33+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
https://go.microsoft.com/fwlink/?LinkID=208121.
4+
-->
5+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
6+
<PropertyGroup>
7+
<PublishProtocol>FileSystem</PublishProtocol>
8+
<Platform>arm64</Platform>
9+
<RuntimeIdentifier>win-arm64</RuntimeIdentifier>
10+
<PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
11+
<SelfContained>true</SelfContained>
12+
<PublishSingleFile>False</PublishSingleFile>
13+
<PublishReadyToRun Condition="'$(Configuration)' == 'Debug'">False</PublishReadyToRun>
14+
<PublishReadyToRun Condition="'$(Configuration)' != 'Debug'">True</PublishReadyToRun>
15+
<!--
16+
See https://github.com/microsoft/CsWinRT/issues/373
17+
<PublishTrimmed>True</PublishTrimmed>
18+
-->
19+
</PropertyGroup>
20+
</Project>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
https://go.microsoft.com/fwlink/?LinkID=208121.
4+
-->
5+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
6+
<PropertyGroup>
7+
<PublishProtocol>FileSystem</PublishProtocol>
8+
<Platform>x64</Platform>
9+
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
10+
<PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
11+
<SelfContained>true</SelfContained>
12+
<PublishSingleFile>False</PublishSingleFile>
13+
<PublishReadyToRun Condition="'$(Configuration)' == 'Debug'">False</PublishReadyToRun>
14+
<PublishReadyToRun Condition="'$(Configuration)' != 'Debug'">True</PublishReadyToRun>
15+
<!--
16+
See https://github.com/microsoft/CsWinRT/issues/373
17+
<PublishTrimmed>True</PublishTrimmed>
18+
-->
19+
</PropertyGroup>
20+
</Project>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
https://go.microsoft.com/fwlink/?LinkID=208121.
4+
-->
5+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
6+
<PropertyGroup>
7+
<PublishProtocol>FileSystem</PublishProtocol>
8+
<Platform>x86</Platform>
9+
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
10+
<PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
11+
<SelfContained>true</SelfContained>
12+
<PublishSingleFile>False</PublishSingleFile>
13+
<PublishReadyToRun Condition="'$(Configuration)' == 'Debug'">False</PublishReadyToRun>
14+
<PublishReadyToRun Condition="'$(Configuration)' != 'Debug'">True</PublishReadyToRun>
15+
<!--
16+
See https://github.com/microsoft/CsWinRT/issues/373
17+
<PublishTrimmed>True</PublishTrimmed>
18+
-->
19+
</PropertyGroup>
20+
</Project>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
https://go.microsoft.com/fwlink/?LinkID=208121.
4+
-->
5+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
6+
<PropertyGroup>
7+
<PublishProtocol>FileSystem</PublishProtocol>
8+
<Platform>arm64</Platform>
9+
<RuntimeIdentifier>win10-arm64</RuntimeIdentifier>
10+
<PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
11+
<SelfContained>true</SelfContained>
12+
<PublishSingleFile>False</PublishSingleFile>
13+
<PublishReadyToRun Condition="'$(Configuration)' == 'Debug'">False</PublishReadyToRun>
14+
<PublishReadyToRun Condition="'$(Configuration)' != 'Debug'">True</PublishReadyToRun>
15+
<!--
16+
See https://github.com/microsoft/CsWinRT/issues/373
17+
<PublishTrimmed>True</PublishTrimmed>
18+
-->
19+
</PropertyGroup>
20+
</Project>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
https://go.microsoft.com/fwlink/?LinkID=208121.
4+
-->
5+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
6+
<PropertyGroup>
7+
<PublishProtocol>FileSystem</PublishProtocol>
8+
<Platform>x64</Platform>
9+
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
10+
<PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
11+
<SelfContained>true</SelfContained>
12+
<PublishSingleFile>False</PublishSingleFile>
13+
<PublishReadyToRun Condition="'$(Configuration)' == 'Debug'">False</PublishReadyToRun>
14+
<PublishReadyToRun Condition="'$(Configuration)' != 'Debug'">True</PublishReadyToRun>
15+
<!--
16+
See https://github.com/microsoft/CsWinRT/issues/373
17+
<PublishTrimmed>True</PublishTrimmed>
18+
-->
19+
</PropertyGroup>
20+
</Project>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
https://go.microsoft.com/fwlink/?LinkID=208121.
4+
-->
5+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
6+
<PropertyGroup>
7+
<PublishProtocol>FileSystem</PublishProtocol>
8+
<Platform>x86</Platform>
9+
<RuntimeIdentifier>win10-x86</RuntimeIdentifier>
10+
<PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
11+
<SelfContained>true</SelfContained>
12+
<PublishSingleFile>False</PublishSingleFile>
13+
<PublishReadyToRun Condition="'$(Configuration)' == 'Debug'">False</PublishReadyToRun>
14+
<PublishReadyToRun Condition="'$(Configuration)' != 'Debug'">True</PublishReadyToRun>
15+
<!--
16+
See https://github.com/microsoft/CsWinRT/issues/373
17+
<PublishTrimmed>True</PublishTrimmed>
18+
-->
19+
</PropertyGroup>
20+
</Project>

src/WinUIExSample/WinUIExSample.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,16 @@
88
<Platforms>x86;x64;ARM64</Platforms>
99
<RuntimeIdentifiers Condition="$([MSBuild]::GetTargetFrameworkVersion('$(TargetFramework)')) &gt;= 8">win-x86;win-x64;win-arm64</RuntimeIdentifiers>
1010
<RuntimeIdentifiers Condition="$([MSBuild]::GetTargetFrameworkVersion('$(TargetFramework)')) &lt; 8">win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
11-
<PublishProfile>win10-$(Platform).pubxml</PublishProfile>
11+
<PublishProfile Condition="$([MSBuild]::GetTargetFrameworkVersion('$(TargetFramework)')) &gt;= 8">win-$(Platform).pubxml</PublishProfile>
12+
<PublishProfile Condition="$([MSBuild]::GetTargetFrameworkVersion('$(TargetFramework)')) &lt; 8">win10-$(Platform).pubxml</PublishProfile>
1213
<UseWinUI>true</UseWinUI>
1314
<EnableMsixTooling>true</EnableMsixTooling>
1415
<Configurations>Debug;Release;Experimental</Configurations>
1516
<LangVersion>11</LangVersion>
1617
<!-- Uncomment to run unpackaged: -->
1718
<!--<WindowsPackageType>None</WindowsPackageType>-->
1819
<WindowsSdkPackageVersion>10.0.22621.38</WindowsSdkPackageVersion>
19-
<PublishAot>true</PublishAot>
20+
<PublishAot Condition="'$(RuntimeIdentifier)'=='win-x64'">true</PublishAot>
2021
</PropertyGroup>
2122

2223
<PropertyGroup Condition="'$(Configuration)'=='Experimental'">

0 commit comments

Comments
 (0)