<?xml version="1.0" encoding="utf-8"?>
<!--

 Licensed to the Apache Software Foundation (ASF) under one
 or more contributor license agreements.  See the NOTICE file
 distributed with this work for additional information
 regarding copyright ownership.  The ASF licenses this file
 to you under the Apache License, Version 2.0 (the
 "License"); you may not use this file except in compliance
 with the License.  You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing,
 software distributed under the License is distributed on an
 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.

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

  <Import Project="$(SolutionDir)build/NuGet.props" />

  <PropertyGroup>
    <TargetFrameworks>netstandard2.0;netstandard1.6</TargetFrameworks>
    <TargetFrameworks Condition="$([MSBuild]::IsOsPlatform('Windows'))">$(TargetFrameworks);net45</TargetFrameworks>
    <PackageTargetFallback Condition=" '$(TargetFramework)' == 'netstandard1.6' ">$(PackageTargetFallback);dnxcore50</PackageTargetFallback>

    <AssemblyTitle>Lucene.Net.TestFramework.MSTest</AssemblyTitle>
    <RootNamespace>Lucene.Net</RootNamespace>
    <Description>Framework for testing third-party code that uses the Lucene.Net API using MSTest.</Description>
    <PackageTags>$(PackageTags);testframework;test;framework;mstest</PackageTags>
    <DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
    <NoWarn>$(NoWarn);1591;1573</NoWarn>

    <DefineConstants>$(DefineConstants);TESTFRAMEWORK_MSTEST</DefineConstants>

    <!-- LUCENENET: Not distributed because of incomplete support (ClassInitialize/ClassCleanup don't support inheritance, no reasonable way to run one class at a time) -->
    <IsPackable>false</IsPackable>
  </PropertyGroup>

  <ItemGroup>
    <Compile Include="..\Lucene.Net.TestFramework\**\*.cs" />
    <Compile Remove="..\Lucene.Net.TestFramework\obj\**\*;..\Lucene.Net.TestFramework\bin\**\*" />
    <Compile Remove="..\Lucene.Net.TestFramework\Properties\*.cs" />
  </ItemGroup>
  
  <ItemGroup>
    <None Remove="..\Lucene.Net.TestFramework\Util\europarl.lines.txt.gz" />
    <EmbeddedResource Include="..\Lucene.Net.TestFramework\Util\europarl.lines.txt.gz" Link="Util\europarl.lines.txt.gz" />
    <None Include="..\Lucene.Net.TestFramework\*.txt" />
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\Lucene.Net.Analysis.Common\Lucene.Net.Analysis.Common.csproj" />
    <ProjectReference Include="..\Lucene.Net.Codecs\Lucene.Net.Codecs.csproj" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="MSTest.TestFramework" Version="$(MSTestTestFrameworkPackageVersion)" />
  </ItemGroup>

  <PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
    <DefineConstants>$(DefineConstants);NETSTANDARD;FEATURE_CONCURRENTMERGESCHEDULER;FEATURE_SERIALIZABLE</DefineConstants>
    <DebugType>portable</DebugType>
  </PropertyGroup>

  <ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.6' ">
    <PackageReference Include="System.Diagnostics.StackTrace" Version="$(SystemDiagnosticsStackTracePackageVersion)" />
    <PackageReference Include="System.Diagnostics.TraceSource" Version="$(SystemDiagnosticsTraceSourcePackageVersion)" />
    <PackageReference Include="System.Net.Primitives" Version="$(SystemNetPrimitivesPackageVersion)" />
    <PackageReference Include="System.Threading.Thread" Version="$(SystemThreadingThreadPackageVersion)" />
  </ItemGroup>

  <PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.6' ">
    <DefineConstants>$(DefineConstants);NETSTANDARD;FEATURE_STACKTRACE</DefineConstants>
    <DebugType>portable</DebugType>
  </PropertyGroup>

  <PropertyGroup Condition=" '$(TargetFramework)' == 'net45' ">
    <DefineConstants>$(DefineConstants);FEATURE_CONCURRENTMERGESCHEDULER;FEATURE_SERIALIZABLE;FEATURE_SERIALIZABLE_EXCEPTIONS</DefineConstants>
    <DebugType>full</DebugType>
  </PropertyGroup>

  <ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
    <Reference Include="System.IO.Compression" />
    <Reference Include="System.Numerics" />
    <Reference Include="System.ServiceModel" />
    <Reference Include="System" />
    <Reference Include="Microsoft.CSharp" />
  </ItemGroup>

</Project>
