<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>
        <COMReference Include="NetFwTypeLib.dll">
          <Guid>58fbcf7c-e7a9-467c-80b3-fc65e8fcca08</Guid>
          <VersionMajor>1</VersionMajor>
          <VersionMinor>0</VersionMinor>
          <Lcid>0</Lcid>
          <WrapperTool>tlbimp</WrapperTool>
          <Isolated>false</Isolated>
        </COMReference>
        <COMReference Include="NETCONLib.dll">
            <Guid>{43E734CA-043D-4A70-9A2C-A8F254063D91}</Guid>
            <VersionMajor>1</VersionMajor>
            <VersionMinor>0</VersionMinor>
            <Lcid>0</Lcid>
            <WrapperTool>tlbimp</WrapperTool>
            <Isolated>False</Isolated>
        </COMReference>
    </ItemGroup>

    <ItemGroup>
        <PackageReference Include="ILMerge" Version="3.0.41" />
        <PackageReference Include="MaxMind.GeoIP2" Version="3.3.0" />
        <PackageReference Include="Microsoft.Diagnostics.Tracing.TraceEvent" Version="2.0.61" />
        <PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
        <PackageReference Include="System.Collections.Immutable" Version="5.0.0-rc.2.20475.5" />
        <PackageReference Include="System.Reflection.Metadata" Version="5.0.0-rc.2.20475.5" />
        <PackageReference Include="WindowsAPICodePack-Shell" Version="1.1.1" />
    </ItemGroup>

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

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

    <ItemGroup>
        <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="set Configuration=$(Configuration)&#xD;&#xA;set ILMergeConsolePath=$(ILMergeConsolePath)&#xD;&#xA;set TargetDir=$(TargetDir)&#xD;&#xA;set SolutionDir=$(SolutionDir)&#xD;&#xA;$(ProjectDir)PostBuild.bat" />
    </Target>
</Project>
