<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk.Web">
  <PropertyGroup>
    <TargetFramework>net5.0</TargetFramework>
    <Configurations>Debug;Release</Configurations>
    <Version>2.0.2</Version>
    <Product>Oqtane</Product>
    <Authors>Shaun Walker</Authors>
    <Company>.NET Foundation</Company>
    <Description>Modular Application Framework for Blazor</Description>
    <Copyright>.NET Foundation</Copyright>
    <PackageProjectUrl>https://www.oqtane.org</PackageProjectUrl>
    <RepositoryUrl>https://github.com/oqtane</RepositoryUrl>
    <RepositoryType>Git</RepositoryType>
    <PackageReleaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v2.0.2</PackageReleaseNotes>
    <RootNamespace>Oqtane</RootNamespace>
    <IsPackable>true</IsPackable>
  </PropertyGroup>
  <ItemGroup>
    <Compile Remove="wwwroot\Modules\Templates\**" />
    <Content Remove="wwwroot\Modules\Templates\**" />
    <EmbeddedResource Remove="wwwroot\Modules\Templates\**" />
    <Compile Remove="wwwroot\Themes\Templates\**" />
    <Content Remove="wwwroot\Themes\Templates\**" />
    <EmbeddedResource Remove="wwwroot\Themes\Templates\**" />
  </ItemGroup>
  <ItemGroup>
    <EmbeddedResource Include="Scripts\MigrateMaster.sql" />
    <EmbeddedResource Include="Scripts\MigrateTenant.sql" />
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="5.0.4" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="5.0.4" />
    <PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.4" />
    <PackageReference Include="Microsoft.Data.SqlClient" Version="2.0.1" />
    <PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.4" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.4">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    </PackageReference>
    <PackageReference Include="Microsoft.Extensions.Localization" Version="5.0.4" />
    <PackageReference Include="Swashbuckle.AspNetCore" Version="5.6.3" />
    <PackageReference Include="System.Drawing.Common" Version="5.0.2" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\Oqtane.Client\Oqtane.Client.csproj" />
    <ProjectReference Include="..\Oqtane.Database.MySQL\Oqtane.Database.MySQL.csproj" />
    <ProjectReference Include="..\Oqtane.Database.PostgreSQL\Oqtane.Database.PostgreSQL.csproj" />
    <ProjectReference Include="..\Oqtane.Database.Sqlite\Oqtane.Database.Sqlite.csproj" />
    <ProjectReference Include="..\Oqtane.Database.SqlServer\Oqtane.Database.SqlServer.csproj" />
    <ProjectReference Include="..\Oqtane.Shared\Oqtane.Shared.csproj" />
    <ProjectReference Include="..\Oqtane.Upgrade\Oqtane.Upgrade.csproj" />
  </ItemGroup>
  <ItemGroup>
    <UpgradeFiles Include="$(ProjectDir)bin\Release\net5.0\Oqtane.Upgrade.deps.json" />
    <UpgradeFiles Include="$(ProjectDir)bin\Release\net5.0\Oqtane.Upgrade.dll" />
    <UpgradeFiles Include="$(ProjectDir)bin\Release\net5.0\Oqtane.Upgrade.pdb" />
    <UpgradeFiles Include="$(ProjectDir)bin\Release\net5.0\Oqtane.Upgrade.runtimeconfig.json" />
    <ModuleTemplateFiles Include="$(ProjectDir)wwwroot\Modules\Templates\**\*.*" />
    <ThemeTemplateFiles Include="$(ProjectDir)wwwroot\Themes\Templates\**\*.*" />
  </ItemGroup>
  <Target Name="AddPayloadsFolder" AfterTargets="Publish">
    <Copy SourceFiles="@(UpgradeFiles)" DestinationFiles="@(UpgradeFiles->'$(PublishDir)%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="false" />
    <Copy SourceFiles="@(ModuleTemplateFiles)" DestinationFiles="@(ModuleTemplateFiles->'$(PublishDir)wwwroot\Modules\Templates\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="false" />
    <Copy SourceFiles="@(ThemeTemplateFiles)" DestinationFiles="@(ThemeTemplateFiles->'$(PublishDir)wwwroot\Themes\Templates\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="false" />
  </Target></Project>
