<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <ImplicitUsings>enable</ImplicitUsings>
    <UseWindowsForms>true</UseWindowsForms>
    <UseWindowsForms>true</UseWindowsForms>
    <AssemblyTitle>PowerToys.PdfPreviewHandler</AssemblyTitle>
    <AssemblyDescription>PowerToys PdfPreviewHandler</AssemblyDescription>
    <Description>PowerToys PdfPreviewHandler</Description>
    <DocumentationFile>..\..\..\..\$(Platform)\$(Configuration)\PdfPreviewPaneDocumentation.xml</DocumentationFile>
    <OutputPath>..\..\..\..\$(Platform)\$(Configuration)</OutputPath>
    <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
    <AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
    <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
    <GenerateSatelliteAssembliesForCore>true</GenerateSatelliteAssembliesForCore>
    <SelfContained>true</SelfContained>
  </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>
    <ProjectGuid>{69E1EE8D-143A-4060-9129-4658ACF14AAF}</ProjectGuid>
    <RootNamespace>Microsoft.PowerToys.PreviewHandler.Pdf</RootNamespace>
    <TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
    <TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
    <SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
    <AssemblyName>PowerToys.PdfPreviewHandler</AssemblyName>
  </PropertyGroup>

  <Import Project="..\..\..\Version.props" />

  <ItemGroup>
    <Compile Update="PdfPreviewHandlerControl.cs" />
    <Compile Update="Properties\Resources.Designer.cs">
      <AutoGen>True</AutoGen>
      <DesignTime>True</DesignTime>
      <DependentUpon>Resources.resx</DependentUpon>
    </Compile>
  </ItemGroup>

  <!-- 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>
  <PropertyGroup>
    <!-- Disable missing comment warning. WinRT/C++ libraries added won't have comments on their reflections. -->
    <NoWarn>$(NoWarn);1591</NoWarn>
    <OutputType>WinExe</OutputType>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.Windows.CsWinRT" />
    <PackageReference Include="System.IO.Abstractions" />
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\..\..\common\Common.UI\Common.UI.csproj" />
    <ProjectReference Include="..\..\..\common\GPOWrapper\GPOWrapper.vcxproj" />
    <ProjectReference Include="..\..\..\common\interop\PowerToys.Interop.vcxproj" />
    <ProjectReference Include="..\..\..\common\ManagedTelemetry\Telemetry\ManagedTelemetry.csproj" />
    <ProjectReference Include="..\common\PreviewHandlerCommon.csproj" />
  </ItemGroup>

</Project>