Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to WinAppSdk 1.6, enable AoT on gallery head #195

Merged
merged 27 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
9e54bb0
Update to WinAppSdk 1.6.240531000-experimental1
Arlodotexe Jun 20, 2024
9349c6c
Enabled AoT for WinAppSdk 1.6-experimental1. Added RuntimeIdentifier …
Arlodotexe Jun 20, 2024
82f8495
Update MultiTarget/PackageReferences/WinAppSdk.props
Arlodotexe Jun 28, 2024
5e643c4
Merge branch 'main' into wasdk/1.6
Arlodotexe Jun 28, 2024
49cb231
Update MultiTarget/PackageReferences/WinAppSdk.props
Arlodotexe Jul 2, 2024
a9d1270
Update to prerelease packages for Wasdk AoT
Arlodotexe Jul 29, 2024
371a247
Disabled AoT on test head, enabled on gallery
Arlodotexe Aug 1, 2024
063405b
Merge branch 'main' into wasdk/1.6
Arlodotexe Aug 1, 2024
0985e1b
Enable PublishAot in debug mode for gallery head
Arlodotexe Aug 1, 2024
c461b3f
Enable RuntimeIdentifier in debug mode
Arlodotexe Aug 1, 2024
7aa3d5d
Merge branch 'main' into wasdk/1.6
Arlodotexe Aug 2, 2024
ed07936
Bump Microsoft.Windows.CsWinRT
Arlodotexe Aug 7, 2024
d013d13
Merge branch 'main' into wasdk/1.6
Arlodotexe Aug 7, 2024
84ae3a8
Fixed syntax error
Arlodotexe Aug 7, 2024
66595f7
Update to Microsoft.WindowsAppSDK 1.6.240701003-experimental2
Arlodotexe Aug 7, 2024
15e3d12
Bump CsWinRT and WindowsSdkPackageVersion to latest stable version
Arlodotexe Aug 9, 2024
127bdc3
Add WinAppSDK 1.6 workaround. See https://github.com/CommunityToolkit…
Arlodotexe Aug 9, 2024
25c4ea8
Revert WindowsSdkPackageVersion to 10.0.22621.37-preview to align wit…
Arlodotexe Aug 9, 2024
edda2be
Update Microsoft.WindowsAppSDK to 1.6.240807006-preview1
Arlodotexe Aug 14, 2024
336ef4c
Update WindowsSdkPackageVersion for Wasdk 1.6 preview1
Arlodotexe Aug 14, 2024
236955c
Update transient WebView2 reference to 1.0.2730-prerelease
Arlodotexe Aug 14, 2024
2fcca69
Revert WindowsSdkPackageVersion to 10.0.22621.37-preview for WindowsA…
Arlodotexe Aug 15, 2024
c3d33c3
Add partial to resolve CsWinRT1028
Arlodotexe Aug 16, 2024
287689f
Restore default enabled TFMs
Arlodotexe Aug 16, 2024
4dbd18a
Reverting 49cb231c9e26fce7627e6491890774b71a9552db. See https://githu…
Arlodotexe Aug 16, 2024
456673a
Remove clean task to resolve https://github.com/CommunityToolkit/Wind…
Arlodotexe Aug 19, 2024
d19db7e
Merge branch 'main' into wasdk/1.6
Arlodotexe Aug 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Build-Toolkit-Components.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,13 @@ function Invoke-MSBuildWithBinlog {
# Ensure output is relative to $pwd, not to the csproj of each component.
$NupkgOutput = (Resolve-Path $NupkgOutput).Path

$msbuildArgs += "-t:Clean,Build,Pack"
$msbuildArgs += "-t:Build,Pack"
$msbuildArgs += "/p:PackageOutputPath=$NupkgOutput"
$msbuildArgs += "/p:DateForVersion=$DateForVersion"
$msbuildArgs += "/p:PreviewVersion=$PreviewVersion"
}
else {
$msbuildArgs += "-t:Clean,Build"
$msbuildArgs += "-t:Build"
}

# Add additional properties to the msbuild arguments
Expand Down
2 changes: 1 addition & 1 deletion Build-Toolkit-Gallery.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Param (
[string[]]$MultiTargets = @('uwp', 'wasdk', 'wasm'), # default settings

[ValidateSet('wasm', 'uwp', 'wasdk', 'wpf', 'linuxgtk', 'macos', 'ios', 'android', 'netstandard')]
[string[]]$ExcludeMultiTargets = @() # default settings
[string[]]$ExcludeMultiTargets = @(), # default settings

[ValidateSet('all', 'Uwp', 'Wasdk', 'Wasm', 'Tests.Uwp', 'Tests.Wasdk')]
[string[]]$Heads = @('Uwp', 'Wasdk', 'Wasm'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace CommunityToolkit.App.Shared.Converters;

public class StringToUriConverter : IValueConverter
public partial class StringToUriConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, string language)
{
Expand Down
2 changes: 1 addition & 1 deletion CommunityToolkit.App.Shared/DocOrSampleTemplateSelector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

namespace CommunityToolkit.App.Shared;

public class DocOrSampleTemplateSelector : DataTemplateSelector
public partial class DocOrSampleTemplateSelector : DataTemplateSelector
{
public DataTemplate? Document { get; set; }
public DataTemplate? Sample { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace CommunityToolkit.App.Shared.Renderers;
/// <summary>
/// Selects a sample option template for the provided <see cref="IGeneratedToolkitSampleOptionViewModel"/>.
/// </summary>
internal class GeneratedSampleOptionTemplateSelector : DataTemplateSelector
internal partial class GeneratedSampleOptionTemplateSelector : DataTemplateSelector
{
public DataTemplate? BoolOptionTemplate { get; set; }

Expand Down
6 changes: 5 additions & 1 deletion MultiTarget/EnabledTargetFrameworks.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@
<PropertyGroup>
<UwpTargetFramework>uap10.0.17763</UwpTargetFramework>
<WinAppSdkTargetFramework>net8.0-windows10.0.22621.0;net7.0-windows10.0.22621.0;net6.0-windows10.0.22621.0;</WinAppSdkTargetFramework>

<WasmHeadTargetFramework>net8.0</WasmHeadTargetFramework>
<LinuxHeadTargetFramework>net8.0</LinuxHeadTargetFramework>
<WpfHeadTargetFramework>net8.0</WpfHeadTargetFramework>

Arlodotexe marked this conversation as resolved.
Show resolved Hide resolved




<!-- Used for comparison to current TargetFramework -->
<LinuxLibTargetFramework>net8.0</LinuxLibTargetFramework>
Expand Down
6 changes: 5 additions & 1 deletion MultiTarget/PackageReferences/WinAppSdk.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<Project>
<ItemGroup>
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.5.240311000" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.6.240807006-preview1" />
Arlodotexe marked this conversation as resolved.
Show resolved Hide resolved
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.756" />
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.2730-prerelease" />
Arlodotexe marked this conversation as resolved.
Show resolved Hide resolved
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.1.1" />
Arlodotexe marked this conversation as resolved.
Show resolved Hide resolved
</ItemGroup>
</Project>
21 changes: 20 additions & 1 deletion MultiTarget/WinUI.Extra.props
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

<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>
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
<WindowsSdkPackageVersion>10.0.22621.37-preview</WindowsSdkPackageVersion>
Arlodotexe marked this conversation as resolved.
Show resolved Hide resolved
</PropertyGroup>

<PropertyGroup Condition="'$(IsUno)' == 'true'">
Expand All @@ -52,4 +52,23 @@
<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)">
Arlodotexe marked this conversation as resolved.
Show resolved Hide resolved
<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>
4 changes: 4 additions & 0 deletions ProjectHeads/App.Head.WinAppSdk.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
<DependencyVariant>WinUI</DependencyVariant>
</PropertyGroup>

<PropertyGroup>
<PublishAot>true</PublishAot>
Arlodotexe marked this conversation as resolved.
Show resolved Hide resolved
</PropertyGroup>

<Import Project="$(MSBuildThisFileDirectory)\App.Head.props" />
<Import Project="$(MSBuildThisFileDirectory)\Head.WinAppSdk.props" />
<Import Project="$(MSBuildThisFileDirectory)\App.Head.WinAppSdk.Dependencies.props" />
Expand Down
6 changes: 3 additions & 3 deletions ProjectHeads/Head.WinAppSdk.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
<Import Project="$(MSBuildThisFileDirectory)\..\MultiTarget\PackageReferences\WinAppSdk.props" />
<Import Project="$(MSBuildThisFileDirectory)\..\MultiTarget\WinUI.Extra.props" />

<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<!-- Set to true when WinAppSdk releases AoT support in 1.6+ -->
<PublishAot>false</PublishAot>
<PropertyGroup>
<RuntimeIdentifier Condition="$([MSBuild]::GetTargetFrameworkVersion('$(TargetFramework)')) >= 8">win-$(Platform)</RuntimeIdentifier>
<RuntimeIdentifier Condition="8 > $([MSBuild]::GetTargetFrameworkVersion('$(TargetFramework)'))">win10-$(Platform)</RuntimeIdentifier>
</PropertyGroup>

<ItemGroup>
Expand Down
Loading