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

    <PropertyGroup>
        <!-- Assembly Properties -->
        <TargetFrameworks>net20;net35;net40;net452;net462;net472;net48;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
        <CheckEolTargetFramework>false</CheckEolTargetFramework>
        <IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
        <LangVersion>latest</LangVersion>
        <Nullable>enable</Nullable>
        <SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
        <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
        <VersionPrefix>3.2.2</VersionPrefix>
        <WarningsNotAsErrors>NU5104</WarningsNotAsErrors>

        <!-- Package Properties -->
        <Authors>Matt Nadareski;ReignStumble;Jakz</Authors>
        <Description>Common code for all MPF execution contexts</Description>
        <Copyright>Copyright (c) Matt Nadareski 2019-2024</Copyright>
        <PackageProjectUrl>https://github.com/SabreTools/</PackageProjectUrl>
        <RepositoryUrl>https://github.com/SabreTools/MPF</RepositoryUrl>
        <RepositoryType>git</RepositoryType>
    </PropertyGroup>

    <ItemGroup>
        <InternalsVisibleTo Include="MPF.Test" />
    </ItemGroup>

    <!-- Support All Frameworks -->
    <PropertyGroup Condition="$(TargetFramework.StartsWith(`net2`)) OR $(TargetFramework.StartsWith(`net3`)) OR $(TargetFramework.StartsWith(`net4`))">
        <RuntimeIdentifiers>win-x86;win-x64</RuntimeIdentifiers>
    </PropertyGroup>
    <PropertyGroup Condition="$(TargetFramework.StartsWith(`netcoreapp`)) OR $(TargetFramework.StartsWith(`net5`))">
        <RuntimeIdentifiers>win-x86;win-x64;win-arm64;linux-x64;linux-arm64;osx-x64</RuntimeIdentifiers>
    </PropertyGroup>
    <PropertyGroup Condition="$(TargetFramework.StartsWith(`net6`)) OR $(TargetFramework.StartsWith(`net7`)) OR $(TargetFramework.StartsWith(`net8`))">
        <RuntimeIdentifiers>win-x86;win-x64;win-arm64;linux-x64;linux-arm64;osx-x64;osx-arm64</RuntimeIdentifiers>
    </PropertyGroup>
    <PropertyGroup Condition="$(RuntimeIdentifier.StartsWith(`osx-arm`))">
        <TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
    </PropertyGroup>

    <!-- Support for old .NET versions -->
    <ItemGroup Condition="$(TargetFramework.StartsWith(`net2`)) OR $(TargetFramework.StartsWith(`net3`)) OR $(TargetFramework.StartsWith(`net40`))">
        <PackageReference Include="MinAsyncBridge" Version="0.12.4" />
        <PackageReference Include="MinTasksExtensionsBridge" Version="0.3.4" />
        <PackageReference Include="MinThreadingBridge" Version="0.11.4" />
    </ItemGroup>
    <ItemGroup Condition="$(TargetFramework.StartsWith(`net4`)) AND !$(TargetFramework.StartsWith(`net40`))">
        <PackageReference Include="IndexRange" Version="1.0.3" />
    </ItemGroup>
    <ItemGroup Condition="!$(TargetFramework.StartsWith(`net2`)) AND !$(TargetFramework.StartsWith(`net3`)) AND !$(TargetFramework.StartsWith(`net40`)) AND !$(TargetFramework.StartsWith(`net452`))">
        <PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
    </ItemGroup>

    <ItemGroup>
        <PackageReference Include="SabreTools.RedumpLib" Version="1.4.1" />
    </ItemGroup>

</Project>