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

  <PropertyGroup>
    <TargetFrameworks>netcoreapp2.0;net40;net46</TargetFrameworks>
    <LangVersion>7.2</LangVersion>
    <Version>0.94.0</Version>
    <IsPackable>false</IsPackable>
    <NoWarn>$(NoWarn);NU1605</NoWarn>
    <Configurations>Debug;Release;Release.Signed</Configurations>
  </PropertyGroup>

  <PropertyGroup>
    <DefineConstants>$(AppVeyor)</DefineConstants>
  </PropertyGroup>
  
  <PropertyGroup Condition="'$(Configuration)'=='Release.Signed'">
    <OutputPath>bin\Release.Signed\</OutputPath>
    <SignAssembly>true</SignAssembly>
    <Optimize>true</Optimize>
    <AssemblyOriginatorKeyFile>ClosedXML.snk</AssemblyOriginatorKeyFile>
    <DefineConstants>$(DefineConstants);RELEASE;STRONGNAME</DefineConstants>
  </PropertyGroup>

  <PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
    <DefineConstants>$(DefineConstants);_NETSTANDARD_;_NETSTANDARD2_0_</DefineConstants>
  </PropertyGroup>

  <PropertyGroup Condition=" '$(TargetFramework)' == 'net40' ">
    <DefineConstants>$(DefineConstants);_NETFRAMEWORK_;_NET40_</DefineConstants>
  </PropertyGroup>

  <PropertyGroup Condition=" '$(TargetFramework)' == 'net46' ">
    <DefineConstants>$(DefineConstants);_NETFRAMEWORK_;_NET46_</DefineConstants>
  </PropertyGroup>

  <ItemGroup>
    <EmbeddedResource Include="**\*.xlsx" Exclude="**\~$*.xlsx;bin\**" />
    <EmbeddedResource Include="Resource\Images\*.png" />
    <EmbeddedResource Include="Resource\Images\*.jpg" />
  </ItemGroup>

  <ItemGroup Condition=" '$(TargetFramework)' == 'net46' or '$(TargetFramework)' == 'netcoreapp2.0' ">
    <PackageReference Include="Microsoft.CSharp" Version="4.4.1" />
    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.7.0" />
    <PackageReference Include="MSTest.TestAdapter" Version="1.2.1" />
    <PackageReference Include="MSTest.TestFramework" Version="1.2.1" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="NUnit" Version="3.10.1" />
    <PackageReference Include="NUnit3TestAdapter" Version="3.10.0" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetFramework)' == 'net40'">
    <Reference Include="Microsoft.CSharp" />
    <Reference Include="WindowsBase" />
  </ItemGroup>

  <ItemGroup>
    <None Include="..\.editorconfig" Link=".editorconfig" />
  </ItemGroup>
  
  <ItemGroup>
    <ProjectReference Include="..\ClosedXML\ClosedXML.csproj" />
    <ProjectReference Include="..\ClosedXML_Examples\ClosedXML_Examples.csproj" />
  </ItemGroup>

</Project>
