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

  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
    <Version>5.1.1</Version>
    <Product>Oqtane</Product>
    <Authors>Shaun Walker</Authors>
    <Company>.NET Foundation</Company>
    <Description>Modular Application Framework for Blazor and MAUI</Description>
    <Copyright>.NET Foundation</Copyright>
    <PackageProjectUrl>https://www.oqtane.org</PackageProjectUrl>
    <PackageLicenseUrl>https://github.com/oqtane/oqtane.framework/blob/dev/LICENSE</PackageLicenseUrl>
    <PackageReleaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v5.1.1</PackageReleaseNotes>
    <RepositoryUrl>https://github.com/oqtane/oqtane.framework</RepositoryUrl>
    <RepositoryType>Git</RepositoryType>
    <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
  </PropertyGroup>

  <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
    <OutputPath>bin</OutputPath>
  </PropertyGroup>

  <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
    <OutputPath>bin</OutputPath>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
    <NoWarn>1701;1702;EF1001;AD0001</NoWarn>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
    <NoWarn>1701;1702;EF1001;AD0001</NoWarn>
  </PropertyGroup>
  
  <ItemGroup>
    <PackageReference Include="MySql.EntityFrameworkCore" Version="8.0.0" />
    <PackageReference Include="MySql.Data" Version="8.3.0" />
  </ItemGroup>

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

  <ItemGroup>
    <MySQLFiles Include="$(OutputPath)Oqtane.Database.MySQL.dll;$(OutputPath)Oqtane.Database.MySQL.pdb;$(OutputPath)MySql.EntityFrameworkCore.dll;$(OutputPath)MySql.Data.dll" DestinationPath="..\Oqtane.Server\bin\$(Configuration)\net8.0\%(Filename)%(Extension)" />
  </ItemGroup>

  <Target Name="PublishProvider" AfterTargets="PostBuildEvent" Inputs="@(MySQLFiles)" Outputs="@(MySQLFiles->'%(DestinationPath)')">
    <Copy SourceFiles="@(MySQLFiles)" DestinationFiles="@(MySQLFiles->'%(DestinationPath)')" />
  </Target>
  
</Project>
