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

  <!-- One project, two builds: .NET 10 with EF Core 10, and .NET 11 with EF Core 11.
       BenchmarkDotNet builds each target framework as its own job and compares them side by side. -->
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFrameworks>net10.0;net11.0</TargetFrameworks>
    <Nullable>enable</Nullable>
    <ImplicitUsings>enable</ImplicitUsings>
    <InvariantGlobalization>true</InvariantGlobalization>
    <RootNamespace>Api</RootNamespace>
    <Optimize>true</Optimize>
    <!-- NU1608: the Npgsql release candidate asks for the EF Core release candidate. See the net11.0 references below. -->
    <NoWarn>$(NoWarn);NU1608</NoWarn>
  </PropertyGroup>

  <ItemGroup>
    <Compile Include="../src/**/*.cs" Exclude="../src/Program.cs" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="BenchmarkDotNet" Version="0.16.0-preview.2" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetFramework)' == 'net10.0'">
    <PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="10.0.3" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetFramework)' == 'net11.0'">
    <!-- EF Core 11.0.0 is released. The Npgsql provider for it is not yet, and its release candidate
         pins the EF Core release candidate, so reference the released EF Core packages directly. -->
    <PackageReference Include="Microsoft.EntityFrameworkCore" Version="11.0.0" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="11.0.0" />
    <PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="11.0.0-rc.3" />
  </ItemGroup>

</Project>
