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

  <PropertyGroup>
    <TargetFrameworks>net20;net35;net40;net452;net462;net472;net48;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
    <RuntimeIdentifiers>win-x86;win-x64;win-arm64;linux-x64;linux-arm64;osx-x64</RuntimeIdentifiers>
    <OutputType>Exe</OutputType>
    <CheckEolTargetFramework>false</CheckEolTargetFramework>
    <IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
    <LangVersion>latest</LangVersion>
    <Nullable>enable</Nullable>
    <SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
  </PropertyGroup>

  <!-- Set a build flag for Windows specifically -->
  <PropertyGroup Condition="'$(RuntimeIdentifier)'=='win-x86'">
    <DefineConstants>$(DefineConstants);WIN</DefineConstants>
  </PropertyGroup>

  <ItemGroup>
    <ProjectReference Include="..\BinaryObjectScanner\BinaryObjectScanner.csproj" />
  </ItemGroup>

  <!-- Support for old .NET versions -->
  <ItemGroup Condition="!$(TargetFramework.StartsWith(`net2`)) AND !$(TargetFramework.StartsWith(`net3`))">
    <PackageReference Include="OpenMcdf" Version="2.3.1" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="SabreTools.Compression" Version="0.5.1" />
    <PackageReference Include="SabreTools.IO" Version="1.4.11" />
    <PackageReference Include="SabreTools.Matching" Version="1.3.1" />
    <PackageReference Include="SabreTools.Models" Version="1.4.8" />
    <PackageReference Include="SabreTools.Serialization" Version="1.6.5" />
    <PackageReference Include="UnshieldSharp" Version="1.8.2" />
  </ItemGroup>

</Project>