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

  <PropertyGroup>
    <TargetFramework>net472</TargetFramework>
    <AssemblyName>Tobey.Subnautica.ConfigHandler.Plugin</AssemblyName>
    <Description>Config handler for Subnautica and Subnautica: Below Zero</Description>
    <Version>1.0.2</Version>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
    <LangVersion>latest</LangVersion>
    <Product>Subnautica Config Handler</Product>
    <RootNamespace>Tobey.Subnautica.ConfigHandler</RootNamespace>
    <BepInExPluginGuid>$(RootNamespace)</BepInExPluginGuid>
    <Copyright>Copyright © Tobey Blaber 2023</Copyright>
    <Configurations>Release</Configurations>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
    <DebugType>none</DebugType>
  </PropertyGroup>

  <Target Name="CleanZip" AfterTargets="AfterClean">
    <Delete Files="..\bin\$(RootNamespace).zip;..\bin\zip\BepInEx\plugins\Tobey\ConfigHandler\$(TargetFileName)" />
  </Target>
  
  <Target Name="BuildZip" AfterTargets="AfterBuild">
    <Copy SourceFiles="$(TargetPath)" DestinationFolder="..\bin\zip\BepInEx\plugins\Tobey\ConfigHandler\" />
    <ZipDirectory SourceDirectory="..\bin\zip\" DestinationFile="..\bin\$(RootNamespace).zip" Overwrite="true" />
  </Target>

  <ItemGroup>
    <PackageReference Include="BepInEx.Analyzers" Version="1.0.8" PrivateAssets="all" ExcludeAssets="runtime">
      <IncludeAssets>compile; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    </PackageReference>
    <PackageReference Include="BepInEx.Core" Version="5.4.21" ExcludeAssets="runtime" />
    <PackageReference Include="BepInEx.PluginInfoProps" Version="1.1.0" ExcludeAssets="runtime" />
    <PackageReference Include="UnityEngine.Modules" Version="2019.2.17" IncludeAssets="compile" ExcludeAssets="runtime" />
  </ItemGroup>
  
  <ItemGroup Condition="'$(TargetFramework.TrimEnd(`0123456789`))' == 'net'">
    <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2" PrivateAssets="all" ExcludeAssets="runtime" />
  </ItemGroup>
  
  <ItemGroup>
    <ProjectReference Include="..\Configuration\Configuration.csproj" />
  </ItemGroup>
  
  <ItemGroup>
    <Reference Update="mscorlib">
      <Private>False</Private>
    </Reference>
  </ItemGroup>
  
  <ItemGroup>
    <Reference Update="System">
      <Private>False</Private>
    </Reference>
  </ItemGroup>
  
  <ItemGroup>
    <Reference Update="System.Core">
      <Private>False</Private>
    </Reference>
  </ItemGroup>
  
  <ItemGroup>
    <Reference Update="System.Data">
      <Private>False</Private>
    </Reference>
  </ItemGroup>
  
  <ItemGroup>
    <Reference Update="System.Drawing">
      <Private>False</Private>
    </Reference>
  </ItemGroup>
  
  <ItemGroup>
    <Reference Update="System.IO.Compression.FileSystem">
      <Private>False</Private>
    </Reference>
  </ItemGroup>
  
  <ItemGroup>
    <Reference Update="System.Numerics">
      <Private>False</Private>
    </Reference>
  </ItemGroup>
  
  <ItemGroup>
    <Reference Update="System.Runtime.Serialization">
      <Private>False</Private>
    </Reference>
  </ItemGroup>
  
  <ItemGroup>
    <Reference Update="System.Xml">
      <Private>False</Private>
    </Reference>
  </ItemGroup>
  
  <ItemGroup>
    <Reference Update="System.Xml.Linq">
      <Private>False</Private>
    </Reference>
  </ItemGroup>
</Project>
