<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
  <Import Project="..\..\..\Version.props" />
  <PropertyGroup>
    <OutputType>WinExe</OutputType>
    <TargetFramework>netcoreapp3.1</TargetFramework>
    <OutputPath>$(SolutionDir)$(Platform)\$(Configuration)\modules\Awake</OutputPath>
    <Nullable>enable</Nullable>
    <Platforms>x64</Platforms>
    <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
    <AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
    <UseWindowsForms>true</UseWindowsForms>
    <!--Per documentation: https://docs.microsoft.com/dotnet/core/compatibility/windows-forms/5.0/automatically-infer-winexe-output-type#outputtype-set-to-winexe-for-wpf-and-winforms-apps -->
    <DisableWinExeOutputInference>true</DisableWinExeOutputInference>
    <AssemblyName>PowerToys.Awake</AssemblyName>
    <Version>$(Version).0</Version>
    <ApplicationIcon>Images\Awake.ico</ApplicationIcon>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <DebugType>full</DebugType>
    <PlatformTarget>x64</PlatformTarget>
    <ErrorReport>prompt</ErrorReport>
    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
    <WarningLevel>4</WarningLevel>
    <Optimize>false</Optimize>
    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <DefineConstants>TRACE;RELEASE</DefineConstants>
    <Optimize>true</Optimize>
    <DebugType>pdbonly</DebugType>
    <PlatformTarget>x64</PlatformTarget>
    <ErrorReport>prompt</ErrorReport>
    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
    <WarningLevel>4</WarningLevel>
    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
    <PackageReference Include="NLog" Version="4.7.9" />
    <PackageReference Include="System.CommandLine" Version="2.0.0-beta1.20071.2" />
    <PackageReference Include="System.Reactive" Version="5.0.0" />
    <PackageReference Include="System.Runtime.Caching" Version="6.0.0-preview.1.21102.12" />
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\..\..\common\ManagedCommon\ManagedCommon.csproj" />
    <ProjectReference Include="..\..\..\settings-ui\Microsoft.PowerToys.Settings.UI.Library\Microsoft.PowerToys.Settings.UI.Library.csproj" />
  </ItemGroup>

  <ItemGroup>
    <Compile Update="Program.cs">
      <CopyToOutputDirectory>Never</CopyToOutputDirectory>
    </Compile>
  </ItemGroup>

  <ItemGroup>
    <None Update="NLog.config">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
  </ItemGroup>
  <ItemGroup>
    <Compile Include="..\..\..\codeAnalysis\GlobalSuppressions.cs">
      <Link>GlobalSuppressions.cs</Link>
    </Compile>
    <AdditionalFiles Include="..\..\..\codeAnalysis\StyleCop.json">
      <Link>StyleCop.json</Link>
    </AdditionalFiles>
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="StyleCop.Analyzers">
      <Version>1.1.118</Version>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
      <PrivateAssets>all</PrivateAssets>
    </PackageReference>
  </ItemGroup>
  <ItemGroup>
    <Resource Include="Images\Awake.ico" />
  </ItemGroup>
</Project>
