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

    <PropertyGroup>
        <OutputType>WinExe</OutputType>
        <TargetFramework>net48</TargetFramework>
        <UseWindowsForms>true</UseWindowsForms>
        <UseWPF>true</UseWPF>
        <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
        <StartupObject>Netch.Netch</StartupObject>
        <ApplicationManifest>App.manifest</ApplicationManifest>
        <ApplicationIcon>Netch.ico</ApplicationIcon>
        <Platforms>x64</Platforms>
        <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
        <LangVersion>latest</LangVersion>
        <PackageProjectUrl>https://github.com/NetchX/Netch</PackageProjectUrl>
    </PropertyGroup>

    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
        <OutputPath>bin\x64\Debug\</OutputPath>
        <DefineConstants>DEBUG;TRACE</DefineConstants>
        <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
        <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
        <WarningsAsErrors />
        <NoWarn />
    </PropertyGroup>

    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
        <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
        <NoWarn />
        <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
        <WarningsAsErrors />
        <OutputPath>bin\x64\Release\</OutputPath>
    </PropertyGroup>

    <ItemGroup>
        <None Remove=".gitignore" />
    </ItemGroup>

    <ItemGroup>
        <COMReference Include="TaskScheduler.dll">
            <Guid>e34cb9f1-c7f7-424c-be29-027dcc09363a</Guid>
            <VersionMajor>1</VersionMajor>
            <VersionMinor>0</VersionMinor>
            <WrapperTool>tlbimp</WrapperTool>
            <Lcid>0</Lcid>
            <Isolated>false</Isolated>
            <EmbedInteropTypes>false</EmbedInteropTypes>
        </COMReference>
    </ItemGroup>

    <ItemGroup>
        <PackageReference Include="ini-parser" Version="2.5.2" />
        <PackageReference Include="MaxMind.GeoIP2" Version="3.2.0" />
        <PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
        <PackageReference Include="System.Buffers" Version="4.5.1" />
        <PackageReference Include="WindowsAPICodePack-Shell" Version="1.1.1" />
    </ItemGroup>

    <ItemGroup>
      <ProjectReference Include="..\NetchLib\NetchLib.csproj" />
    </ItemGroup>

    <ItemGroup>
        <Reference Include="System.Net.Http" />
        <Reference Include="System.ServiceProcess" />
        <Reference Include="System.Web" />
    </ItemGroup>

    <ItemGroup>
        <Compile Update="Forms\Server\Trojan.cs">
          <SubType>Form</SubType>
        </Compile>
        <Compile Update="Properties\Resources.Designer.cs">
            <DesignTime>True</DesignTime>
            <AutoGen>True</AutoGen>
            <DependentUpon>Resources.resx</DependentUpon>
        </Compile>
        <Compile Update="Properties\Settings.Designer.cs">
            <DesignTimeSharedInput>True</DesignTimeSharedInput>
            <AutoGen>True</AutoGen>
            <DependentUpon>Settings.settings</DependentUpon>
        </Compile>
    </ItemGroup>

    <ItemGroup>
        <EmbeddedResource Update="Properties\Resources.resx">
            <Generator>ResXFileCodeGenerator</Generator>
            <LastGenOutput>Resources.Designer.cs</LastGenOutput>
        </EmbeddedResource>
    </ItemGroup>

    <ItemGroup>
        <None Update="Properties\Settings.settings">
            <Generator>SettingsSingleFileGenerator</Generator>
            <LastGenOutput>Settings.Designer.cs</LastGenOutput>
        </None>
    </ItemGroup>
    <ProjectExtensions><VisualStudio><UserProperties /></VisualStudio></ProjectExtensions>
    <Target Name="PostBuild" AfterTargets="PostBuildEvent">
      <Exec Command="@ECHO OFF&#xD;&#xA;RD /S /Q $(TargetDir)bin &gt; NUL 2&gt;&amp;1&#xD;&#xA;RD /S /Q $(TargetDir)i18n &gt; NUL 2&gt;&amp;1&#xD;&#xA;RD /S /Q $(TargetDir)mode &gt; NUL 2&gt;&amp;1&#xD;&#xA;&#xD;&#xA;MKDIR $(TargetDir)bin &gt; NUL 2&gt;&amp;1&#xD;&#xA;MKDIR $(TargetDir)i18n &gt; NUL 2&gt;&amp;1&#xD;&#xA;MKDIR $(TargetDir)mode &gt; NUL 2&gt;&amp;1&#xD;&#xA;&#xD;&#xA;COPY /Y $(SolutionDir)binaries\* $(TargetDir)bin &gt; NUL 2&gt;&amp;1&#xD;&#xA;COPY /Y $(SolutionDir)translations\i18n\* $(TargetDir)i18n &gt; NUL 2&gt;&amp;1&#xD;&#xA;COPY /Y $(SolutionDir)modes\mode\* $(TargetDir)mode &gt; NUL 2&gt;&amp;1&#xD;&#xA;MKDIR $(TargetDir)bin\tap-driver &gt; NUL 2&gt;&amp;1&#xD;&#xA;COPY /Y $(SolutionDir)binaries\tap-driver\* $(TargetDir)bin\tap-driver &gt; NUL 2&gt;&amp;1&#xD;&#xA;&#xD;&#xA;DEL / f $(TargetDir)\*.config&#xD;&#xA;DEL / f $(TargetDir)\*.pdb" />
    </Target>
</Project>
