<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>
    <RootNamespace>Microsoft.PowerToys.Run.Plugin.PowerToys</RootNamespace>
    <AssemblyName>Microsoft.PowerToys.Run.Plugin.PowerToys</AssemblyName>
    <Version>$(Version).0</Version>
    <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
    <AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
    <GenerateSatelliteAssembliesForCore>true</GenerateSatelliteAssembliesForCore>
    <OutputPath>..\..\..\..\..\$(Platform)\$(Configuration)\RunPlugins\PowerToys\</OutputPath>
  </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>

  <PropertyGroup Condition="'$(Configuration)'=='Debug'">
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <Optimize>false</Optimize>
    <DebugType>full</DebugType>
    <DebugSymbols>true</DebugSymbols>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)'=='Release'">
    <DefineConstants>TRACE</DefineConstants>
    <Optimize>true</Optimize>
    <DebugType>pdbonly</DebugType>
  </PropertyGroup>

  <ItemGroup>
    <ProjectReference Include="..\..\..\..\common\GPOWrapper\GPOWrapper.vcxproj" />
    <ProjectReference Include="..\..\Wox.Infrastructure\Wox.Infrastructure.csproj" />
    <ProjectReference Include="..\..\Wox.Plugin\Wox.Plugin.csproj" />
  </ItemGroup>

  <ItemGroup>
    <None Include="plugin.json">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.Windows.CsWinRT" />
    <PackageReference Include="System.Diagnostics.EventLog">
      <!-- This package is a dependency of Microsoft.Extensions.Logging.EventLog, but we need to set it here so we can exclude the assets, so it doesn't conflict with the 8.0.1 dll coming from .NET SDK. -->
      <ExcludeAssets>runtime</ExcludeAssets> <!-- Should already be present on .net sdk runtime, so we avoid the conflicting runtime version from nuget -->
    </PackageReference>
    <PackageReference Include="System.CodeDom">
      <!-- This package is a dependency of System.Management, but we need to set it here so we can exclude the assets, so it doesn't conflict with the 8.0.1 dll coming from .NET SDK. -->
      <ExcludeAssets>runtime</ExcludeAssets> <!-- Should already be present on .net sdk runtime, so we avoid the conflicting runtime version from nuget -->
    </PackageReference>
  </ItemGroup>

  <ItemGroup>
    <Compile Update="Properties\Resources.Designer.cs">
      <DesignTime>True</DesignTime>
      <AutoGen>True</AutoGen>
      <DependentUpon>Resources.resx</DependentUpon>
    </Compile>
  </ItemGroup>
  <ItemGroup>
    <EmbeddedResource Update="Properties\Resources.resx">
      <Generator>ResXFileCodeGenerator</Generator>
      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
    </EmbeddedResource>
  </ItemGroup>

  <ItemGroup>
    <None Update="Images\PowerToys.dark.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
    <None Update="Images\PowerToys.light.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>

    <Content Include="..\..\..\..\settings-ui\Settings.UI\Assets\Settings\Icons\ColorPicker.png">
      <Link>Images\ColorPicker.png</Link>
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="..\..\..\..\settings-ui\Settings.UI\Assets\Settings\Icons\FancyZones.png">
      <Link>Images\FancyZones.png</Link>
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="..\..\..\..\settings-ui\Settings.UI\Assets\Settings\Icons\CropAndLock.png">
      <Link>Images\CropAndLock.png</Link>
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="..\..\..\..\settings-ui\Settings.UI\Assets\Settings\Icons\Hosts.png">
      <Link>Images\Hosts.png</Link>
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="..\..\..\..\settings-ui\Settings.UI\Assets\Settings\Icons\TextExtractor.png">
      <Link>Images\PowerOcr.png</Link>
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="..\..\..\..\settings-ui\Settings.UI\Assets\Settings\Icons\RegistryPreview.png">
      <Link>Images\RegistryPreview.png</Link>
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="..\..\..\..\settings-ui\Settings.UI\Assets\Settings\Icons\ScreenRuler.png">
      <Link>Images\ScreenRuler.png</Link>
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="..\..\..\..\settings-ui\Settings.UI\Assets\Settings\Icons\ShortcutGuide.png">
      <Link>Images\ShortcutGuide.png</Link>
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="..\..\..\..\settings-ui\Settings.UI\Assets\Settings\Icons\EnvironmentVariables.png">
      <Link>Images\EnvironmentVariables.png</Link>
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
  </ItemGroup>

</Project>
