<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>WinExe</OutputType>
    <!-- net48 = Windows 10/11 (x64, full app incl. wallpaper maker/SkiaSharp).
         net40 = Windows XP SP3 (x86): full runtime + mapping editor; wallpaper
         GENERATION is excluded (SkiaSharp has no XP support) — XP applies
         pre-rendered wallpapers only. See docs/PLAN.md §Phase 8. -->
    <TargetFrameworks>net48;net40</TargetFrameworks>
    <Platforms>x64</Platforms>
    <Nullable>enable</Nullable>
    <UseWindowsForms>true</UseWindowsForms>
    <ImplicitUsings>enable</ImplicitUsings>
    <LangVersion>latest</LangVersion>
    <ApplicationManifest>app.manifest</ApplicationManifest>
  </PropertyGroup>

  <PropertyGroup Condition="'$(TargetFramework)' == 'net48'">
    <PlatformTarget>x64</PlatformTarget>
  </PropertyGroup>

  <PropertyGroup Condition="'$(TargetFramework)' == 'net40'">
    <PlatformTarget>x86</PlatformTarget>
  </PropertyGroup>

  <ItemGroup Condition="'$(TargetFramework)' == 'net40'">
    <!-- net40 has no System.Net.Http assembly for the implicit global using. -->
    <Using Remove="System.Net.Http" />
    <!-- Wallpaper maker needs the SkiaSharp renderer (RioJoy.Overlay) — modern only. -->
    <Compile Remove="Editor\WallpaperMakerForm.cs" />
    <Compile Remove="Editor\WallpaperCanvas.cs" />
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\RioJoy.Core\RioJoy.Core.csproj" />
    <ProjectReference Include="..\RioJoy.Overlay\RioJoy.Overlay.csproj" Condition="'$(TargetFramework)' == 'net48'" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="all" />
    <PackageReference Include="PolySharp" Version="1.14.1">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    </PackageReference>
  </ItemGroup>

</Project>
