Skip to content

Commit

Permalink
Merge pull request #2239 from unoplatform/mergify/bp/release/stable/4…
Browse files Browse the repository at this point in the history
….1/pr-2234

fixing issue with error on WinUI due to Win2D graphics (backport #2234)
  • Loading branch information
dansiegel authored Apr 8, 2024
2 parents 9ddfff3 + 1af43cd commit bb08647
Show file tree
Hide file tree
Showing 22 changed files with 41 additions and 46 deletions.
4 changes: 2 additions & 2 deletions samples/MauiEmbedding/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<ItemGroup>
<PackageVersion Include="CommunityToolkit.Mvvm" Version="8.2.0" />
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
<PackageVersion Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.756" />
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.4.231219000" />
<PackageVersion Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.3233" />
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.5.240311000" />
<PackageVersion Include="SkiaSharp" Version="2.88.7" />
<PackageVersion Include="SkiaSharp.Views.Uno.WinUI" Version="2.88.7" />
<PackageVersion Include="SkiaSharp.NativeAssets.iOS" Version="2.88.7" />
Expand Down
4 changes: 2 additions & 2 deletions samples/Playground/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
<PackageVersion Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.2.13" />
<PackageVersion Include="Microsoft.UI.Xaml" Version="2.7.1" />
<PackageVersion Include="Microsoft.Windows.Compatibility" Version="7.0.3" />
<PackageVersion Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.756" />
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.4.231219000" />
<PackageVersion Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.3233" />
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.5.240311000" />
<PackageVersion Include="Refit" Version="6.3.2" />
<PackageVersion Include="Refit.HttpClientFactory" Version="6.3.2" />
<PackageVersion Include="SkiaSharp.Views" Version="2.88.6" />
Expand Down
4 changes: 2 additions & 2 deletions src/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

<Choose>
<When Condition="$(_IsWinUI)">
<ItemGroup>
<ItemGroup Condition="$(ExcludeWinAppSdkReference) != 'true'">
<PackageReference Include="Microsoft.WindowsAppSDK" Condition="$(WinAppSdkVersion)==''"/>
<PackageReference Include="Microsoft.WindowsAppSDK" Condition="$(WinAppSdkVersion)!=''" VersionOverride="$(WinAppSdkVersion)"/>
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" />
Expand Down Expand Up @@ -95,5 +95,5 @@
<!--Prevent projects from duplicating assemblies in every output folder-->
<Private Condition="'$(OutputType)' == 'library' and '$(NugetOverrideVersion)'==''">false</Private>
</ProjectReference>
</ItemDefinitionGroup>
</ItemDefinitionGroup>
</Project>
3 changes: 2 additions & 1 deletion src/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.1.1" />
<PackageVersion Include="Microsoft.UI.Xaml" Version="2.7.1" />
<PackageVersion Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.756" />
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.4.231219000" />
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.4.231219000" />
<PackageVersion Include="Microsoft.Graphics.Win2D" Version="1.2.0" />
<PackageVersion Include="Moq" Version="4.17.2" />
<PackageVersion Include="Refit" Version="6.3.2" />
<PackageVersion Include="Refit.HttpClientFactory" Version="6.3.2" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="MSBuild.Sdk.Extras" ToolsVersion="15.0">
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<Import Project="..\tfms-ui-winui.props" />

<PropertyGroup>
Expand All @@ -22,9 +22,9 @@
<Platforms>x86;x64;arm64</Platforms>
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
</PropertyGroup>

<Import Project="common.props" />

<PropertyGroup>
<PackageId>Uno.Extensions.Authentication.MSAL.WinUI</PackageId>
<DefineConstants>$(DefineConstants);WINUI</DefineConstants>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="MSBuild.Sdk.Extras" ToolsVersion="15.0">
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<Import Project="..\tfms-ui-winui.props" />

<PropertyGroup>
Expand All @@ -9,7 +9,7 @@
</PropertyGroup>

<Import Project="common.props" />

<PropertyGroup>
<PackageId>Uno.Extensions.Authentication.Oidc.WinUI</PackageId>
<DefineConstants>$(DefineConstants);WINUI</DefineConstants>
Expand All @@ -18,7 +18,7 @@
<ItemGroup >
<PackageReference Include="Uno.WinUI" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Uno.Extensions.Authentication.UI\Uno.Extensions.Authentication.WinUI.csproj" />
<ProjectReference Include="..\Uno.Extensions.Http.UI\Uno.Extensions.Http.WinUI.csproj" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="MSBuild.Sdk.Extras" ToolsVersion="15.0">
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<Import Project="..\tfms-ui-winui.props" />

<PropertyGroup>
Expand All @@ -7,7 +7,7 @@
</PropertyGroup>

<Import Project="common.props" />

<PropertyGroup>
<PackageId>Uno.Extensions.Authentication.WinUI</PackageId>
<DefineConstants>$(DefineConstants);WINUI</DefineConstants>
Expand Down
6 changes: 3 additions & 3 deletions src/Uno.Extensions.Core.UI/Uno.Extensions.Core.WinUI.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="MSBuild.Sdk.Extras" ToolsVersion="15.0">
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<Import Project="..\tfms-ui-winui.props" />

<PropertyGroup>
<Description>Core Extensions for the Uno Platform (WinUI)</Description>
</PropertyGroup>

<Import Project="common.props" />

<PropertyGroup>
Expand All @@ -15,4 +15,4 @@
<ItemGroup>
<PackageReference Include="Uno.WinUI" />
</ItemGroup>
</Project>
</Project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="MSBuild.Sdk.Extras" ToolsVersion="15.0">
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<Import Project="..\tfms-ui-winui.props" />
<ItemGroup>
<Compile Remove="WasmScripts\**" />
Expand All @@ -10,7 +10,7 @@
<UnoRuntimeProjectReference Include="Uno.Extensions.Hosting.WinUI.Wasm.csproj" />
<UnoRuntimeProjectReference Include="Uno.Extensions.Hosting.WinUI.Skia.csproj" />
</ItemGroup>

<ItemGroup>
<Content Include="buildTransitive\Uno.Extensions.Hosting.WinUI.props">
<PackagePath>buildTransitive</PackagePath>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="MSBuild.Sdk.Extras" ToolsVersion="15.0">
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<Import Project="..\tfms-ui-winui.props" />

<Import Project="common.props" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="MSBuild.Sdk.Extras" ToolsVersion="15.0">
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<Import Project="..\tfms-ui-winui.props" />

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="MSBuild.Sdk.Extras" ToolsVersion="15.0">
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">

<Import Project="..\tfms-ui-winui.props" />

Expand Down
2 changes: 2 additions & 0 deletions src/Uno.Extensions.Maui.UI/Uno.Extensions.Maui.WinUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<IsMauiEmbedding>false</IsMauiEmbedding>
<IsMauiEmbedding Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android' OR $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios' OR $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst' OR $(TargetFramework.Contains('windows10'))">true</IsMauiEmbedding>
<DefineConstants Condition="$(IsMauiEmbedding)">$(DefineConstants);MAUI_EMBEDDING</DefineConstants>
<ExcludeWinAppSdkReference>true</ExcludeWinAppSdkReference>
</PropertyGroup>

<ItemGroup>
Expand All @@ -24,6 +25,7 @@
<PackageReference Include="Uno.WinUI" />
<PackageReference Include="Microsoft.Maui.Controls" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" />
<PackageReference Include="Microsoft.Graphics.Win2D" Condition="$(TargetFramework.Contains('-windows10'))" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<IsMauiEmbedding>false</IsMauiEmbedding>
<IsMauiEmbedding Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android' OR $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios' OR $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst' OR $(TargetFramework.Contains('windows10'))">true</IsMauiEmbedding>
<DefineConstants Condition="$(IsMauiEmbedding)">$(DefineConstants);MAUI_EMBEDDING</DefineConstants>
<WinAppSdkVersion>1.4.231219000</WinAppSdkVersion>
<ExcludeWinAppSdkReference>true</ExcludeWinAppSdkReference>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="MSBuild.Sdk.Extras" ToolsVersion="15.0">
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<Import Project="..\tfms-ui-winui.props" />

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="MSBuild.Sdk.Extras" ToolsVersion="15.0">
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<Import Project="..\tfms-ui-winui.props" />

<PropertyGroup>
Expand All @@ -7,7 +7,7 @@
<!--Temporary disable missing XML doc until fixed in the whole package-->
<WarningsNotAsErrors>$(WarningsNotAsErrors);CS1591</WarningsNotAsErrors>
<DefineConstants>$(DefineConstants);WINUI</DefineConstants>
<WinAppSdkVersion>1.4.231219000</WinAppSdkVersion>
<PackageDescription>A set of C# for Markup helpers for Uno.Extensions.Navigation.WinUI</PackageDescription>
</PropertyGroup>

<ItemGroup>
Expand All @@ -18,8 +18,4 @@
<ItemGroup>
<ProjectReference Include="..\Uno.Extensions.Navigation.UI\Uno.Extensions.Navigation.WinUI.csproj" />
</ItemGroup>

<PropertyGroup>
<PackageDescription>A set of C# for Markup helpers for Uno.Extensions.Navigation.WinUI</PackageDescription>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="MSBuild.Sdk.Extras" ToolsVersion="15.0">
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<Import Project="..\tfms-ui-winui.props" />

<PropertyGroup>
Expand All @@ -7,7 +7,7 @@
</PropertyGroup>

<Import Project="common.props" />

<PropertyGroup>
<PackageId>Uno.Extensions.Navigation.WinUI</PackageId>
<DefineConstants>$(DefineConstants);WINUI</DefineConstants>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project Sdk="MSBuild.Sdk.Extras" ToolsVersion="15.0">
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<Import Project="..\tfms-ui-winui.props" />

<PropertyGroup>
<PackageId>Uno.Extensions.Reactive.WinUI.Markup</PackageId>
<!--Temporary disable missing XML doc until fixed in the whole package-->
<WarningsNotAsErrors>$(WarningsNotAsErrors);CS1591</WarningsNotAsErrors>
<DefineConstants>$(DefineConstants);WINUI</DefineConstants>
<WinAppSdkVersion>1.4.231219000</WinAppSdkVersion>
<PackageDescription>A set of C# for Markup helpers for Uno.Extensions.Reactive.WinUI</PackageDescription>
</PropertyGroup>

<ItemGroup>
Expand All @@ -18,8 +18,4 @@
<ItemGroup>
<ProjectReference Include="..\Uno.Extensions.Reactive.UI\Uno.Extensions.Reactive.WinUI.csproj" />
</ItemGroup>

<PropertyGroup>
<PackageDescription>A set of C# for Markup helpers for Uno.Extensions.Reactive.WinUI</PackageDescription>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="MSBuild.Sdk.Extras" ToolsVersion="15.0">
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<Import Project="..\tfms-ui-winui.props" />

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="MSBuild.Sdk.Extras" ToolsVersion="15.0">
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<Import Project="..\tfms-ui-winui.props" />

<!--
Expand All @@ -10,7 +10,7 @@
<EnableDefaultPageItems>false</EnableDefaultPageItems>
<DefineConstants>$(DefineConstants);WINUI</DefineConstants>
<PackageId>Uno.Extensions.Reactive.WinUI</PackageId>

<UnoXamlResourcesTrimming Condition="'$(MSBuildRuntimeType)'=='Core' and '$(Configuration)'=='Release'">true</UnoXamlResourcesTrimming>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="MSBuild.Sdk.Extras" ToolsVersion="15.0">
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<Import Project="..\tfms-ui-winui.props" />

<PropertyGroup>
Expand All @@ -10,7 +10,7 @@
</PropertyGroup>

<Import Project="common.props" />

<PropertyGroup>
<PackageId>Uno.Extensions.Storage.WinUI</PackageId>
<DefineConstants>$(DefineConstants);WINUI</DefineConstants>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="MSBuild.Sdk.Extras" ToolsVersion="15.0">
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<Import Project="..\tfms-ui-winui.props" />

<PropertyGroup>
<Description>Toolkit Extensions for the Uno Platform (WinUI)</Description>
</PropertyGroup>

<PropertyGroup>
<PackageId>Uno.Extensions.Toolkit.WinUI</PackageId>
<DefineConstants>$(DefineConstants);WINUI</DefineConstants>
Expand Down

0 comments on commit bb08647

Please sign in to comment.