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

  <PropertyGroup>
    <TargetFramework>net5.0</TargetFramework>
    <LangVersion>9.0</LangVersion>
    <RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>
    <OutputType>exe</OutputType>
    <ApplicationIcon>nadeko_icon.ico</ApplicationIcon>
  </PropertyGroup>
  
  <ItemGroup>
    <PackageReference Include="AngleSharp" Version="0.16.0" />
    <PackageReference Include="AWSSDK.S3" Version="3.7.1.19" />
    <PackageReference Include="Cloneable" Version="1.3.0" />
    <PackageReference Include="CodeHollow.FeedReader" Version="1.2.1" />
    <PackageReference Include="CommandLineParser" Version="2.8.0" />
    <PackageReference Include="Discord.Net" Version="2.4.0" />
    <PackageReference Include="CoreCLR-NCalc" Version="2.2.92" />
    <PackageReference Include="Google.Apis.Urlshortener.v1" Version="1.41.1.138" />
    <PackageReference Include="Google.Apis.YouTube.v3" Version="1.53.0.2378" />
    <PackageReference Include="Google.Apis.Customsearch.v1" Version="1.49.0.2084" />
    <PackageReference Include="Google.Protobuf" Version="3.17.3" />
    <PackageReference Include="Grpc.Net.ClientFactory" Version="2.38.0" />
    <PackageReference Include="Grpc.Tools" Version="2.38.1">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    </PackageReference>
    <PackageReference Include="Html2Markdown" Version="4.0.0.427" />
    <PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.8" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.8">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    </PackageReference>
    <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.8" />
    <PackageReference Include="Microsoft.Extensions.Configuration" Version="5.0.0" />
    <PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="5.0.0" />
    <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="5.0.0" />
    <PackageReference Include="NetEscapades.Configuration.Yaml" Version="2.1.0" />
    <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.2" />
    <PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="5.0.0" />
    <PackageReference Include="Microsoft.Extensions.Http" Version="5.0.0" />
    <PackageReference Include="Microsoft.Extensions.Logging.Console" Version="5.0.0" />
    <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="5.0.0" />
    <PackageReference Include="Microsoft.SyndicationFeed.ReaderWriter" Version="1.0.2" />
    <PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
    <PackageReference Include="Scrutor" Version="3.3.0" />
    <PackageReference Include="Serilog.Sinks.Console" Version="4.0.0" />
    <PackageReference Include="Serilog.Sinks.Seq" Version="5.0.1" />
    <PackageReference Include="SixLabors.ImageSharp" Version="1.0.3" />
    <PackageReference Include="SixLabors.ImageSharp.Drawing" Version="1.0.0-beta0010" />
    <PackageReference Include="StackExchange.Redis" Version="2.2.62" />
    <PackageReference Include="VideoLibrary" Version="3.1.2" />
    <PackageReference Include="YamlDotNet" Version="11.2.1" />
    <PackageReference Include="YoutubeExplode" Version="6.0.5" />
    <PackageReference Include="linq2db.EntityFrameworkCore" Version="5.4.0" />
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\ayu\Ayu.Discord.Voice\Ayu.Discord.Voice.csproj" />
    <ProjectReference Include="..\NadekoBot.Generators\NadekoBot.Generators.csproj" OutputItemType="Analyzer" />
  </ItemGroup>
  
  <ItemGroup>
    <AdditionalFiles Include="data\strings\responses\responses.en-US.json" />
  </ItemGroup>
  <ItemGroup>
    <Protobuf Include="..\NadekoBot.Coordinator\Protos\coordinator.proto" GrpcServices="Client">
      <Link>Protos\coordinator.proto</Link>
    </Protobuf>
    <None Update="data\**\*">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
    <None Update="nadeko_icon.ico;libopus.so;libsodium.so;libsodium.dll;opus.dll">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
    <None Update="creds_example.yml;data\images_backup.json;data\xp_template_backup.json">
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </None>
  </ItemGroup>

  <PropertyGroup Condition=" '$(Version)' == '' ">
    <VersionPrefix Condition=" '$(VersionPrefix)' == '' ">3.0.0</VersionPrefix>
    <Version Condition=" '$(VersionSuffix)' != '' ">$(VersionPrefix).$(VersionSuffix)</Version>
    <Version Condition=" '$(Version)' == '' ">$(VersionPrefix)</Version>
  </PropertyGroup>
  
  <PropertyGroup Condition=" '$(Configuration)' == 'GlobalNadeko' ">
    <DefineConstants>$(DefineConstants);GLOBAL_NADEKO</DefineConstants>
    <NoWarn>$(NoWarn);CS1573;CS1591</NoWarn>
  </PropertyGroup>

</Project>
