<Project Sdk="Microsoft.NET.Sdk">
  <Import Project="..\..\..\Version.props" />

  <PropertyGroup>
    <TargetFramework>net8.0-windows</TargetFramework>
    <ProjectGuid>{4FD29318-A8AB-4D8F-AA47-60BC241B8DA3}</ProjectGuid>
    <OutputType>Library</OutputType>
    <UseWpf>true</UseWpf>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>Wox.Infrastructure</RootNamespace>
    <AssemblyName>Wox.Infrastructure</AssemblyName>
    <Version>$(Version).0</Version>
    <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
    <AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
    <OutputPath>..\..\..\..\$(Platform)\$(Configuration)\WoxInfrastructure</OutputPath>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Platform)'=='x64'">
    <RuntimeIdentifier>win-x64</RuntimeIdentifier>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Platform)'=='ARM64'">
    <RuntimeIdentifier>win-arm64</RuntimeIdentifier>
  </PropertyGroup>

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

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

  <ItemGroup>
    <ProjectReference Include="..\Wox.Plugin\Wox.Plugin.csproj">
      <Project>{8451ecdd-2ea4-4966-bb0a-7bbc40138e80}</Project>
      <Name>Wox.Plugin</Name>
    </ProjectReference>
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="NLog.Schema" />
    <PackageReference Include="hyjiacan.pinyin4net" />
    <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>
    <PackageReference Include="System.Drawing.Common">
      <ExcludeAssets>runtime</ExcludeAssets> <!-- Should already be present on .net sdk runtime, so we avoid the conflicting runtime version from nuget -->
    </PackageReference>
    <PackageReference Include="System.IO.Abstractions" />
  </ItemGroup>
</Project>