<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <!-- <TargetFrameworks>netcoreapp2.1;</TargetFrameworks> -->
    <TargetFrameworks>netcoreapp2.1;netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
    <Title>Prise.Mvc</Title>
    <PackageId>Prise.Mvc</PackageId>
    <PackageDescription>Adds ASP.NET MVC features to an existing Prise setup!</PackageDescription>
    <Authors>Maarten Merken</Authors>
    <Company>MRKN</Company>
    <PackageTags>mvc;controllers;plugin</PackageTags>
    <PackageLicenseUrl>https://raw.githubusercontent.com/merken/Prise/master/LICENSE</PackageLicenseUrl>
    <PackageProjectUrl>https://github.com/merken/Prise</PackageProjectUrl>
    <RepositoryUrl>https://github.com/merken/Prise.git</RepositoryUrl>
    <RepositoryType>git</RepositoryType>
    <TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage</TargetsForTfmSpecificBuildOutput>
  </PropertyGroup>

  <Target DependsOnTargets="ResolveReferences" Name="CopyProjectReferencesToPackage">
    <ItemGroup>
      <BuildOutputInPackage Include="@(ReferenceCopyLocalPaths-&gt;WithMetadataValue('ReferenceSourceTarget', 'ProjectReference'))" />
    </ItemGroup>
  </Target>

  <PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp2.1'">
    <DefineConstants>NETCORE2_1</DefineConstants>
  </PropertyGroup>

  <!-- Constants (NETCORE2_1, NETCORE3_1) are one or the other, if multiple constants are required, prefix it with $(DefineConstants);-->
  
  <PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
    <DefineConstants>NETCORE3_1</DefineConstants>
  </PropertyGroup>

  <PropertyGroup>
    <PackageIcon>icon.png</PackageIcon>
    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
  </PropertyGroup>

  <ItemGroup>
    <None Include="../icon.png">
      <Pack>True</Pack>
      <PackagePath></PackagePath>
    </None>
  </ItemGroup>

  <ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.1'">
    <PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.1.3" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc.Razor" Version="2.1.3" />
    <PackageReference Include="Microsoft.Extensions.FileProviders.Physical" Version="2.1.1" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
    <PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.5" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc.Razor" Version="2.2.0" />
    <PackageReference Include="Microsoft.Extensions.FileProviders.Physical" Version="3.0.1" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="3.0.2" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
    <PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="3.1.0" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.5" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc.Razor" Version="2.2.0" />
    <PackageReference Include="Microsoft.Extensions.FileProviders.Physical" Version="3.1.0" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="3.1.0" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
    <PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="5.0.0" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.5" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc.Razor" Version="2.2.0" />
    <PackageReference Include="Microsoft.Extensions.FileProviders.Physical" Version="5.0.0" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="5.0.0" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
    <PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.5" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc.Razor" Version="2.2.0" />
    <PackageReference Include="Microsoft.Extensions.FileProviders.Physical" Version="6.0.0" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="6.0.0" />
  </ItemGroup>
  
  <ItemGroup>
    <ProjectReference Include="..\Prise.Plugin\Prise.Plugin.csproj">
      <ReferenceOutputAssembly>true</ReferenceOutputAssembly>
      <IncludeAssets>Prise.Plugin.dll</IncludeAssets>
    </ProjectReference>
    <ProjectReference Include="..\Prise.Proxy\Prise.Proxy.csproj">
      <ReferenceOutputAssembly>true</ReferenceOutputAssembly>
      <IncludeAssets>Prise.Proxy.dll</IncludeAssets>
    </ProjectReference>
    <ProjectReference Include="..\Prise\Prise.csproj">
      <ReferenceOutputAssembly>true</ReferenceOutputAssembly>
      <IncludeAssets>Prise.dll</IncludeAssets>
    </ProjectReference>
  </ItemGroup>

</Project>
