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

  <PropertyGroup>
    <TargetFrameworks>net6.0;net462</TargetFrameworks>
    <NoWarn />
    <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
    <WarningsAsErrors />
  </PropertyGroup>

  <ItemGroup>
    <Compile Remove="Indexers\**" />
    <EmbeddedResource Remove="Indexers\**" />
    <EmbeddedResource Include="Common\Utils\Invalid-RSS.xml" />
    <None Remove="Indexers\**" />
  </ItemGroup>

  <ItemGroup>
    <None Remove="Common\Utils\Invalid-RSS.xml" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Autofac" Version="6.5.0" />
    <PackageReference Include="coverlet.msbuild" Version="3.2.0">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    </PackageReference>
    <PackageReference Include="FluentAssertions" Version="6.8.0" />
    <PackageReference Include="Microsoft.AspNetCore.DataProtection" Version="6.0.12" />
    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
    <PackageReference Include="MSTest.TestAdapter" Version="3.0.2" />
    <PackageReference Include="MSTest.TestFramework" Version="3.0.2" />
    <PackageReference Include="NUnit" Version="3.13.3" />
    <PackageReference Include="NUnit.ConsoleRunner" Version="3.16.1" />
    <PackageReference Include="NUnit3TestAdapter" Version="4.3.1" />
    <PackageReference Include="System.Text.Encoding.CodePages" Version="6.0.0" />
  </ItemGroup>

  <ItemGroup>
    <Folder Include="Properties\" />
    <Folder Include="Server" />
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\Jackett.Common\Jackett.Common.csproj" />
    <ProjectReference Include="..\Jackett.Server\Jackett.Server.csproj" />
  </ItemGroup>

  <!-- Conditionally obtain references for the .NET462 target -->
  <ItemGroup Condition=" '$(TargetFramework)' == 'net462' ">
    <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" />
    <Reference Include="System.Web" />
  </ItemGroup>

  <ItemGroup>
    <Content Include="Resources\*">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
  </ItemGroup>

</Project>
