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

    <PropertyGroup>
        <OutputType>WinExe</OutputType>
        <UseWPF>true</UseWPF>
        <UseWindowsForms>true</UseWindowsForms>
        <TargetFramework>net6.0-windows</TargetFramework>
        <PlatformTarget>x64</PlatformTarget>
        <RuntimeIdentifier>win-x64</RuntimeIdentifier>
        <Nullable>enable</Nullable>
        <ApplicationIcon>Resources\icon.ico</ApplicationIcon>
        <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
        <GenerateAssemblyInfo>true</GenerateAssemblyInfo>
        <Deterministic>false</Deterministic>

        <!--
         ~ 이 속성들은 publish에 영향을 미칩니다.
         ~ 단순 프로젝트 빌드에는 영향을 미치지 않습니다.
         ~ 추가적인 속성들이 publish 프로파일에 정의되어 있을 수 있습니다(예: ClickOnceProfile).
         ~ 아래 속성들은 단일 실행 파일을 생성하도록 설정되어 있습니다.
         ~ 단일 실행 파일을 만들고자 한다면, 아래에 언급된 속성들을 유지한 채로(커맨드라인 인자 넣어서 바꾸지 말고!) publish를 진행하면 됩니다.
         -->
        <SelfContained>false</SelfContained>
        <PublishSingleFile>true</PublishSingleFile>
        <PublishReadyToRun>false</PublishReadyToRun>
        <IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
    </PropertyGroup>

    <ItemGroup>
        <None Remove="Resources\DSEG7Classic-Bold.ttf" />
        <None Remove="Resources\DSEG7Classic-Regular.ttf" />
        <None Remove="Resources\log4net.config" />
    </ItemGroup>

    <ItemGroup>
        <Content Include="Resources\log4net.config">
            <CopyToOutputDirectory>Always</CopyToOutputDirectory>
        </Content>
    </ItemGroup>

    <ItemGroup>
        <PackageReference Include="CalcBinding" Version="2.5.2" />
        <PackageReference Include="Extended.Wpf.Toolkit" Version="4.5.0" />
        <PackageReference Include="log4net" Version="2.0.15" />
        <PackageReference Include="MaterialDesignThemes" Version="5.0.0-ci368" />
        <PackageReference Include="Meziantou.Framework.Win32.CredentialManager" Version="1.4.2" />
        <PackageReference Include="Microsoft.AppCenter.Analytics" Version="5.0.2" />
        <PackageReference Include="Microsoft.AppCenter.Crashes" Version="5.0.2" />
        <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.10" />
        <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
        <PackageReference Include="System.Drawing.Common" Version="7.0.0" />
    </ItemGroup>

    <ItemGroup>
        <ProjectReference Include="..\skiasharp\LiveChartsCore.SkiaSharp.WPF\LiveChartsCore.SkiaSharpView.WPF.csproj" />
    </ItemGroup>

    <ItemGroup>
        <Resource Include="Resources\DSEG7Classic-Bold.ttf" />
        <Resource Include="Resources\DSEG7Classic-Regular.ttf" />
    </ItemGroup>

    <ItemGroup>
        <Compile Update="Properties\Settings.Designer.cs">
            <DesignTimeSharedInput>True</DesignTimeSharedInput>
            <AutoGen>True</AutoGen>
            <DependentUpon>Settings.settings</DependentUpon>
        </Compile>
        <Compile Update="Features\Timer\Slot\TimerSlotControl.xaml.cs">
            <SubType>Code</SubType>
        </Compile>
        <Compile Update="Features\Timer\Border\BorderWindow.xaml.cs">
            <SubType>Code</SubType>
        </Compile>
        <Compile Update="Features\Charting\Metric\PrimaryMetricView.xaml.cs">
            <SubType>Code</SubType>
        </Compile>
        <Compile Update="Resources\strings.Designer.cs">
          <DesignTime>True</DesignTime>
          <AutoGen>True</AutoGen>
          <DependentUpon>strings.resx</DependentUpon>
        </Compile>
        <Compile Update="Resources\strings.ko-KR.Designer.cs">
          <DesignTime>True</DesignTime>
          <AutoGen>True</AutoGen>
          <DependentUpon>strings.ko-KR.resx</DependentUpon>
        </Compile>
        <Compile Update="Resources\strings.ko-KR.Designer.cs">
          <DesignTime>True</DesignTime>
          <AutoGen>True</AutoGen>
          <DependentUpon>strings.ko-KR.resx</DependentUpon>
        </Compile>
        <Compile Remove="Resources\strings.zh-CN.Designer.cs" />
        <Compile Remove="Resources\strings.ru-RU.Designer.cs" />
        <Compile Remove="Resources\strings.ro-RO.Designer.cs" />
        <Compile Remove="Resources\strings.ja-JP.Designer.cs" />
        <Compile Remove="Resources\strings.it-IT.Designer.cs" />
        <Compile Remove="Resources\strings.fr-FR.Designer.cs" />
        <Compile Remove="Resources\strings.es-ES.Designer.cs" />
        <Compile Remove="Resources\strings.de-DE.Designer.cs" />
    </ItemGroup>

    <ItemGroup>
        <None Update="Properties\Settings.settings">
            <Generator>SettingsSingleFileGenerator</Generator>
            <LastGenOutput>Settings.Designer.cs</LastGenOutput>
        </None>
    </ItemGroup>

    <ItemGroup>
        <ApplicationDefinition Remove="App.xaml" />
        <Page Include="App.xaml" />
        <Page Update="Features\Timer\Slot\TimerSlotControl.xaml">
            <Generator>MSBuild:Compile</Generator>
            <XamlRuntime>Wpf</XamlRuntime>
            <SubType>Designer</SubType>
        </Page>
        <Page Update="Features\Timer\Border\BorderWindow.xaml">
            <Generator>MSBuild:Compile</Generator>
            <XamlRuntime>Wpf</XamlRuntime>
            <SubType>Designer</SubType>
        </Page>
        <Page Update="Features\Charting\Usages\AppUsageView.xaml">
            <Generator>MSBuild:Compile</Generator>
            <XamlRuntime>Wpf</XamlRuntime>
            <SubType>Designer</SubType>
        </Page>
        <Page Update="Features\Charting\Metric\PrimaryMetricView.xaml">
            <Generator>MSBuild:Compile</Generator>
            <XamlRuntime>Wpf</XamlRuntime>
            <SubType>Designer</SubType>
        </Page>
        <Page Update="Features\Charting\Usages\Detail\UsageByTimeView.xaml">
            <Generator>MSBuild:Compile</Generator>
            <XamlRuntime>Wpf</XamlRuntime>
            <SubType>Designer</SubType>
        </Page>
        <Page Update="Library\Control\CircularProgressBar\MaterialDesignTheme.ProgressBar.xaml">
          <Generator>MSBuild:Compile</Generator>
          <XamlRuntime>Wpf</XamlRuntime>
          <SubType>Designer</SubType>
        </Page>
        <Page Update="Features\Splash\SplashWindow.xaml">
          <Generator>MSBuild:Compile</Generator>
          <XamlRuntime>Wpf</XamlRuntime>
          <SubType>Designer</SubType>
        </Page>
    </ItemGroup>

    <ItemGroup>
      <EmbeddedResource Update="Resources\strings.resx">
        <Generator>PublicResXFileCodeGenerator</Generator>
        <LastGenOutput>strings.Designer.cs</LastGenOutput>
      </EmbeddedResource>
      <EmbeddedResource Update="Resources\strings.ko-KR.resx">
        <Generator>ResXFileCodeGenerator</Generator>
        <LastGenOutput>strings.Designer.cs</LastGenOutput>
      </EmbeddedResource>
      <EmbeddedResource Update="Resources\strings.ko-KR.resx">
        <Generator>PublicResXFileCodeGenerator</Generator>
        <LastGenOutput>strings.ko-KR.Designer.cs</LastGenOutput>
      </EmbeddedResource>
    </ItemGroup>

    <ItemGroup>
      <Reference Include="System.Windows.Forms">
        <HintPath>..\..\..\..\..\..\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll</HintPath>
      </Reference>
    </ItemGroup>

    <Target Name="SetAssemblyVersion" BeforeTargets="BeforeCompile">
        <FormatVersion Version="$(ApplicationVersion)" Revision="$(ApplicationRevision)">
            <Output PropertyName="AssemblyVersion" TaskParameter="OutputVersion" />
        </FormatVersion>
        <FormatVersion Version="$(ApplicationVersion)" Revision="$(ApplicationRevision)">
            <Output PropertyName="InformationalVersion" TaskParameter="OutputVersion" />
        </FormatVersion>
        <FormatVersion Version="$(ApplicationVersion)" Revision="$(ApplicationRevision)">
            <Output PropertyName="FileVersion" TaskParameter="OutputVersion" />
        </FormatVersion>
    </Target>

    <Target Name="AutoSetMinimumRequiredVersion" BeforeTargets="GenerateDeploymentManifest">
        <FormatVersion Version="$(ApplicationVersion)" Revision="$(ApplicationRevision)">
            <Output PropertyName="MinimumRequiredVersion" TaskParameter="OutputVersion" />
        </FormatVersion>
        <FormatVersion Version="$(ApplicationVersion)" Revision="$(ApplicationRevision)">
            <Output PropertyName="_DeploymentBuiltMinimumRequiredVersion" TaskParameter="OutputVersion" />
        </FormatVersion>
    </Target>

</Project>
