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

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net8.0</TargetFramework>
    <MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish>
    <PackageId>RaidMax.IW4MAdmin.Application</PackageId>
    <Version>2020.0.0.0</Version>
    <Authors>RaidMax</Authors>
    <Company>Forever None</Company>
    <Product>IW4MAdmin</Product>
    <Description>IW4MAdmin is a complete server administration tool for IW4x and most Call of Duty® dedicated servers</Description>
    <Copyright>2020</Copyright>
    <PackageLicenseUrl>https://github.com/RaidMax/IW4M-Admin/blob/master/LICENSE</PackageLicenseUrl>
    <PackageProjectUrl>https://raidmax.org/IW4MAdmin</PackageProjectUrl>
    <RepositoryUrl>https://github.com/RaidMax/IW4M-Admin</RepositoryUrl>
    <PackageIconUrl>https://raidmax.org/IW4MAdmin/img/iw4adminicon-3.png</PackageIconUrl>
    <ApplicationIcon />
    <AssemblyName>IW4MAdmin</AssemblyName>
    <Configurations>Debug;Release;Prerelease</Configurations>
    <Win32Resource />
    <RootNamespace>IW4MAdmin.Application</RootNamespace>
    <PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>
    <Nullable>disable</Nullable>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Jint" Version="3.1.3" />
    <PackageReference Include="MaxMind.GeoIP2" Version="5.2.0" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.6">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    </PackageReference>
    <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
    <PackageReference Include="Refit" Version="7.1.0" />
    <PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
    <PackageReference Include="System.CommandLine.DragonFruit" Version="0.4.0-alpha.22272.1" />
    <PackageReference Include="System.Text.Encoding.CodePages" Version="8.0.0" />
  </ItemGroup>

  <PropertyGroup>
    <ServerGarbageCollection>true</ServerGarbageCollection>
    <ConcurrentGarbageCollection>true</ConcurrentGarbageCollection>
    <TieredCompilation>true</TieredCompilation>
    <LangVersion>Latest</LangVersion>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Prerelease|AnyCPU'">
    <ErrorReport>none</ErrorReport>
    <DebugType>full</DebugType>
    <DebugSymbols>true</DebugSymbols>
  </PropertyGroup>

  <ItemGroup>
    <ProjectReference Include="..\Integrations\Cod\Integrations.Cod.csproj" />
    <ProjectReference Include="..\Integrations\Source\Integrations.Source.csproj" />
    <ProjectReference Include="..\Data\Data.csproj" />
    <ProjectReference Include="..\SharedLibraryCore\SharedLibraryCore.csproj">
      <Private>true</Private>
    </ProjectReference>
    <ProjectReference Include="..\WebfrontCore\WebfrontCore.csproj" />
  </ItemGroup>

  <ItemGroup>
    <None Update="DefaultSettings.json">
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </None>
    <None Update="Configuration\LoggingConfiguration.json">
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </None>
    <None Update="Resources\GeoLite2-Country.mmdb">
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </None>
  </ItemGroup>

  <Target Name="PreBuild" BeforeTargets="PreBuildEvent" Condition="'$(ConfigurationName)'=='Debug'">
    <Exec Command="powershell.exe $(ProjectDir)BuildScripts\PreBuild.ps1 $(SolutionDir) $(TargetDir)" />
  </Target>
  
</Project>
