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

    <PropertyGroup>
        <DefineConstants>$(DefineConstants);NETCOREWIN</DefineConstants>
        <UseWindowsForms>true</UseWindowsForms>
        <AssemblyName>FastReport.Compat</AssemblyName>
        <PackageId>$(AssemblyName)</PackageId>
        <ProduceReferenceAssembly>false</ProduceReferenceAssembly>
        <TargetFramework>net6.0-windows</TargetFramework>
        <AssemblyVersion>2022.2.0.1</AssemblyVersion>
        <SignAssembly>false</SignAssembly>
    </PropertyGroup>

    <!--Explicit import Directory.Build.props (for old-style csproj)-->
    <Import Project="..\Directory.Build.props" Condition="'$(UsingMicrosoftNETSdk)' != 'true'"/>

    <PropertyGroup Condition="'$(TargetFramework)'!='netcoreapp3.0'">
        <OutputPath>$(BaseOutputPath)\lib</OutputPath>
    </PropertyGroup>

    <PropertyGroup Condition="'$(TargetFramework)'!='net40'">
        <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
    </PropertyGroup>

    <PropertyGroup Condition="'$(TargetFramework)'=='netcoreapp3.0'">
        <OutDir>$(BaseOutputPath)\build\$(TargetFramework)\lib\Win</OutDir>
    </PropertyGroup>

    <Import Project="$(SlnDir)\UsedPackages.version"/>

    <ItemGroup Condition="'$(TargetFramework)'=='netcoreapp3.0'">
        <PackageReference Include="System.Drawing.Common" Version="$(SystemDrawingCommonVersion)"/>
    </ItemGroup>

    <ItemGroup>
        <Compile Remove="$(SourceCode)\WindowsForms\**\*.cs"/>
        <Compile Remove="$(SourceCode)\DotNetClasses\UITypeEditor.cs"/>
    </ItemGroup>

    <ItemGroup>
        <PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.0.1"/>
        <PackageReference Include="Microsoft.CodeAnalysis.VisualBasic" Version="4.0.1"/>
        <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2">
            <PrivateAssets>all</PrivateAssets>
            <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
        </PackageReference>
    </ItemGroup>

</Project>
