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

  <Import Project="..\common.props" />

  <PropertyGroup>
    <OutputType>WinExe</OutputType>
    <Configurations>Debug;Release</Configurations>
    <UseWindowsForms>true</UseWindowsForms>
    <ImplicitUsings>enable</ImplicitUsings>
    <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
    <ApplicationManifest>App.manifest</ApplicationManifest>
    <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
    <AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
    <ApplicationIcon>Resources\Netch.ico</ApplicationIcon>
    <IsPackable>false</IsPackable>
    <!-- event handler async void Warning -->
    <NoWarn>VSTHRD100</NoWarn>
    <EnableNETAnalyzers>true</EnableNETAnalyzers>
    <AnalysisMode>Default</AnalysisMode>
    <CodeAnalysisTreatWarningsAsErrors>true</CodeAnalysisTreatWarningsAsErrors>
    <EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
    <TargetFramework>net6.0-windows</TargetFramework>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <OutputPath>bin\x64\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <OutputPath>bin\x64\Release\</OutputPath>
    <DebugType>none</DebugType>
    <DebugSymbols>false</DebugSymbols>
  </PropertyGroup>

  <ItemGroup>
    <Using Include="Serilog" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="ConfigureAwait.Fody" Version="3.3.2">
      <PrivateAssets>all</PrivateAssets>
    </PackageReference>
    <PackageReference Include="Fody" Version="6.6.4">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    </PackageReference>
    <PackageReference Include="HMBSbige.SingleInstance" Version="6.0.0" />
    <PackageReference Include="MaxMind.GeoIP2" Version="5.1.0" />
    <PackageReference Include="Microsoft.Diagnostics.Tracing.TraceEvent" Version="3.0.7" GeneratePathProperty="true" />
    <PackageReference Include="Microsoft.VisualStudio.Threading" Version="17.5.22" />
    <PackageReference Include="Microsoft.Windows.CsWin32" Version="0.1.588-beta">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    </PackageReference>
    <PackageReference Include="Nullable.Extended.Analyzer" Version="1.10.4539">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    </PackageReference>
    <PackageReference Include="Serilog" Version="3.0.1" />
    <PackageReference Include="Serilog.Extensions.Hosting" Version="5.0.1" />
    <PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
    <PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
    <PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
    <PackageReference Include="Stun.Net" Version="6.2.0" />
    <PackageReference Include="System.Management" Version="7.0.0" />
    <PackageReference Include="TaskScheduler" Version="2.10.1" />
    <PackageReference Include="WindowsFirewallHelper" Version="2.2.0.86" />
    <PackageReference Include="System.ServiceProcess.ServiceController" Version="7.0.0" />
    <PackageReference Include="System.Text.Encoding.CodePages" Version="7.0.0" />
    <PackageReference Include="WindowsJobAPI" Version="6.0.0" />
  </ItemGroup>

  <ItemGroup>
    <EmbeddedResource Update="Properties\Resources.resx">
      <Generator>ResXFileCodeGenerator</Generator>
      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
    </EmbeddedResource>
    <Compile Update="Properties\Resources.Designer.cs">
      <DesignTime>True</DesignTime>
      <AutoGen>True</AutoGen>
      <DependentUpon>Resources.resx</DependentUpon>
    </Compile>
    <Compile Update="Forms\SyncGlobalCheckBox.cs">
      <SubType>UserControl</SubType>
    </Compile>
  </ItemGroup>

  <ItemGroup>
    <None Remove="NativeMethods.txt" />
    <None Update="NOTICE.txt">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
  </ItemGroup>

  <Target Condition="'$(PublishSingleFile)' == 'true'" AfterTargets="_ComputeFilesToBundle" Name="RemoveDupeAssemblies">
    <ItemGroup>
      <_FilesToBundle Remove="$(PkgMicrosoft_Diagnostics_Tracing_TraceEvent)\build\native\x86\**" />
    </ItemGroup>
  </Target>

</Project>
