<Project Sdk="Microsoft.NET.Sdk">
  <Import Project="..\..\..\..\Version.props" />
  <PropertyGroup>
    <TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
    <TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
    <SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
    <OutputType>WinExe</OutputType>
    <UseWindowsForms>true</UseWindowsForms>
    <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
    <AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
    <AssemblyName>PowerToys.MouseWithoutBordersHelper</AssemblyName>    
    <DisableWinExeOutputInference>true</DisableWinExeOutputInference>    
    <ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
    <OutputPath>..\..\..\..\..\$(Platform)\$(Configuration)</OutputPath>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
    <SelfContained>true</SelfContained>
    <Version>$(Version).0</Version>
  </PropertyGroup>

  <!-- SelfContained=true requires RuntimeIdentifier to be set -->
  <PropertyGroup Condition="'$(Platform)'=='x64'">
    <RuntimeIdentifier>win-x64</RuntimeIdentifier>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Platform)'=='ARM64'">
    <RuntimeIdentifier>win-arm64</RuntimeIdentifier>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)' == 'Debug'">
    <DefineConstants>MM_HELPER;TRACE;DEBUG;SHOW_ON_WINLOGON CODE_ANALYSIS CUSTOMIZE_LOGON_SCREEN</DefineConstants>
    <UseVSHostingProcess>false</UseVSHostingProcess>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)' == 'Release'">
    <DefineConstants>MM_HELPER;TRACE;SHOW_ON_WINLOGON CODE_ANALYSIS CUSTOMIZE_LOGON_SCREEN</DefineConstants>
    <UseVSHostingProcess>false</UseVSHostingProcess>
    <NoWarn>
    </NoWarn>
  </PropertyGroup>
  <PropertyGroup>
    <ApplicationIcon>..\Logo.ico</ApplicationIcon>
  </PropertyGroup>
  <PropertyGroup>
    <NoWin32Manifest>true</NoWin32Manifest>
  </PropertyGroup>
  <!-- See https://learn.microsoft.com/windows/apps/develop/platform/csharp-winrt/net-projection-from-cppwinrt-component for more info -->
  <PropertyGroup>
    <CsWinRTIncludes>PowerToys.GPOWrapper</CsWinRTIncludes>
    <CsWinRTGeneratedFilesDir>$(OutDir)</CsWinRTGeneratedFilesDir>
    <ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
  </PropertyGroup>
  <ItemGroup>
    <Compile Remove="Resources\**" />
        <Compile Remove="Service\**" />
    <EmbeddedResource Remove="Resources\**" />
        <EmbeddedResource Remove="Service\**" />
        <ExcludeFromStyleCop Remove="Service\**" />
    <None Remove="Resources\**" />
        <None Remove="Service\**" />
  </ItemGroup>

  <ItemGroup>
    <Compile Include="..\Class\IClipboardHelper.cs">
      <Link>IClipboardHelper.cs</Link>
    </Compile>
  </ItemGroup>

  <ItemGroup>
    <None Update="MouseWithoutBordersHelper.exe.manifest">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.Windows.CsWinRT" />
    <PackageReference Include="Microsoft.Windows.Compatibility" />
    <PackageReference Include="StreamJsonRpc" />
    <PackageReference Include="System.Data.SqlClient" /> <!-- It's a dependency of Microsoft.Windows.Compatibility. We're adding it here to force it to the version specified in Directory.Packages.props -->
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\..\..\..\common\GPOWrapper\GPOWrapper.vcxproj" />
    <ProjectReference Include="..\..\..\..\settings-ui\Settings.UI.Library\Settings.UI.Library.csproj" />
  </ItemGroup>
  <PropertyGroup>
    <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
  </PropertyGroup>
</Project>