Skip to content

Commit

Permalink
fix: Allow building SamplesApp.Windows for .NET 9
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinZikmund committed Dec 5, 2024
1 parent 1f49455 commit 2e99d0f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/SamplesApp/SamplesApp.Windows/SamplesApp.Windows.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>$(NetPrevious)-windows10.0.19041.0</TargetFramework>
<TargetFrameworks>$(NetPrevious)-windows10.0.19041.0</TargetFrameworks>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<RootNamespace>SamplesApp.Windows</RootNamespace>
<ApplicationManifest>app.manifest</ApplicationManifest>
Expand All @@ -19,6 +19,8 @@
<WindowsSdkPackageVersion>10.0.19041.53</WindowsSdkPackageVersion>
</PropertyGroup>

<Import Project="../../targetframework-override.props" />

<ItemGroup>
<Content Include="Assets\SplashScreen.scale-200.png" />
<Content Include="Assets\LockScreenLogo.scale-200.png" />
Expand Down
4 changes: 2 additions & 2 deletions src/Uno.CrossTargetting.targets
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
<SupportedOSPlatformVersion>21.0</SupportedOSPlatformVersion>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' != 'uap10.0.19041' and '$(TargetFramework)'!='net8.0-windows10.0.19041.0' and '$(TargetPlatformIdentifier)' != 'UAP'">
<PropertyGroup Condition=" '$(TargetFramework)' != 'uap10.0.19041' and $(TargetFramework.EndsWith('-windows10.0.19041.0')) != 'true' and '$(TargetPlatformIdentifier)' != 'UAP'">
<DefineConstants>$(DefineConstants);HAS_UNO</DefineConstants>
<DefineConstants Condition="'$(UNO_UWP_BUILD)'!='true'">$(DefineConstants);HAS_UNO_WINUI</DefineConstants>

Expand All @@ -111,7 +111,7 @@
<DefaultXamlRuntime Condition="'$(DefaultXamlRuntime)'==''">WinUI</DefaultXamlRuntime>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)'=='net8.0-windows10.0.19041.0'">
<PropertyGroup Condition="$(TargetFramework.EndsWith('-windows10.0.19041.0'))">
<DefineConstants>$(DefineConstants);HAS_INPUT_INJECTOR;WINDOWS_WINUI;HAS_RENDER_TARGET_BITMAP;HAS_COMPOSITION_API</DefineConstants>
</PropertyGroup>

Expand Down

0 comments on commit 2e99d0f

Please sign in to comment.