|
1 | 1 | <Project Sdk="Uno.Sdk"> |
2 | 2 | <PropertyGroup> |
3 | | - <TargetFramework>net10.0-desktop</TargetFramework> |
4 | | - <OutputType>Library</OutputType> |
| 3 | + <TargetFrameworks>net10.0-desktop</TargetFrameworks> |
| 4 | + <TargetFrameworks Condition="'$(OS)' == 'Windows_NT'">$(TargetFrameworks);net10.0-windows10.0.19041.0</TargetFrameworks> |
| 5 | + <OutputType>Exe</OutputType> |
5 | 6 | <StartupObject>UnoEdit.Tests.Program</StartupObject> |
| 7 | + <WinUISDKReferences>false</WinUISDKReferences> |
| 8 | + <UnoSingleProject>true</UnoSingleProject> |
| 9 | + <UnoFeatures>SkiaRenderer;</UnoFeatures> |
6 | 10 | <ImplicitUsings>disable</ImplicitUsings> |
7 | 11 | <Nullable>disable</Nullable> |
8 | 12 | <IsPackable>false</IsPackable> |
|
12 | 16 | <NoWarn>$(NoWarn);CA1416</NoWarn> |
13 | 17 | </PropertyGroup> |
14 | 18 |
|
| 19 | + <PropertyGroup Condition="'$(TargetFramework)' == 'net10.0-windows10.0.19041.0'"> |
| 20 | + <UseWinUI>true</UseWinUI> |
| 21 | + <EnableWindowsTargeting>true</EnableWindowsTargeting> |
| 22 | + <DefineConstants>$(DefineConstants);WINDOWS_APP_SDK</DefineConstants> |
| 23 | + <WindowsSdkPackageVersion>10.0.19041.57</WindowsSdkPackageVersion> |
| 24 | + </PropertyGroup> |
| 25 | + |
| 26 | + <!-- Uno.SingleProject.WinAppSdk.targets sets OutputType=WinExe for Uno heads after static evaluation. |
| 27 | + Restore it to Exe before test validation and compilation. --> |
| 28 | + <Target Name="_RestoreOutputTypeForTests" |
| 29 | + BeforeTargets="BeforeBuild" |
| 30 | + Condition="'$(TargetFramework)' == 'net10.0-windows10.0.19041.0'"> |
| 31 | + <PropertyGroup> |
| 32 | + <OutputType>Exe</OutputType> |
| 33 | + </PropertyGroup> |
| 34 | + </Target> |
| 35 | + |
15 | 36 | <ItemGroup> |
16 | 37 | <PackageReference Include="Microsoft.NET.Test.Sdk" /> |
17 | 38 | <PackageReference Include="NUnit" /> |
18 | 39 | <PackageReference Include="NUnitLite" /> |
19 | 40 | <PackageReference Include="NUnit3TestAdapter" /> |
20 | 41 | </ItemGroup> |
21 | 42 |
|
22 | | - <ItemGroup> |
23 | | - <ProjectReference Include="..\UnoEdit\UnoEdit.csproj" /> |
24 | | - <ProjectReference Include="..\UnoEdit.TextMate\UnoEdit.TextMate.csproj" /> |
| 43 | + <ItemGroup Condition="'$(TargetFramework)' == 'net10.0-windows10.0.19041.0'"> |
| 44 | + <PackageReference Include="Microsoft.WindowsAppSDK" /> |
| 45 | + </ItemGroup> |
| 46 | + |
| 47 | + <ItemGroup Condition="'$(TargetFramework)' == 'net10.0-desktop'"> |
| 48 | + <ProjectReference Include="..\UnoEdit\UnoEdit.csproj" SetTargetFramework="TargetFramework=net9.0-desktop" /> |
| 49 | + <ProjectReference Include="..\UnoEdit.TextMate\UnoEdit.TextMate.csproj" SetTargetFramework="TargetFramework=net9.0-desktop" /> |
| 50 | + </ItemGroup> |
| 51 | + |
| 52 | + <ItemGroup Condition="'$(TargetFramework)' == 'net10.0-windows10.0.19041.0'"> |
| 53 | + <ProjectReference Include="..\UnoEdit\UnoEdit.csproj" SetTargetFramework="TargetFramework=net9.0-windows10.0.19041.0" /> |
| 54 | + <ProjectReference Include="..\UnoEdit.TextMate\UnoEdit.TextMate.csproj" SetTargetFramework="TargetFramework=net9.0-windows10.0.19041.0" /> |
25 | 55 | </ItemGroup> |
26 | 56 |
|
27 | 57 | <ItemGroup> |
|
0 commit comments