<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\Version.props" />
  
  <PropertyGroup>
    <TargetFramework>net8.0-windows</TargetFramework>
    <ProjectGuid>{8451ECDD-2EA4-4966-BB0A-7BBC40138E80}</ProjectGuid>
    <UseWPF>true</UseWPF>
    <OutputType>Library</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>Wox.Plugin</RootNamespace>
    <AssemblyName>Wox.Plugin</AssemblyName>
    <Version>$(Version).0</Version>
    <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
    <AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
    <GenerateSatelliteAssembliesForCore>true</GenerateSatelliteAssembliesForCore>
    <OutputPath>..\..\..\..\$(Platform)\$(Configuration)\WoxPlugin</OutputPath>
  </PropertyGroup>


  <PropertyGroup Condition="'$(Configuration)'=='Debug'">
    <DebugSymbols>true</DebugSymbols>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <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>

  <PropertyGroup>
    <DefaultItemExcludes>$(DefaultItemExcludes);**/*.Template.xaml</DefaultItemExcludes>
  </PropertyGroup>
  <ItemGroup>
    <EmbeddedResource Include="**/*.Template.xaml" />
    <EmbeddedResource Include="**/GeneratorParameters.json" />
    <UpToDateCheckInput Include="**/*.xaml" />
  </ItemGroup>

  <ItemGroup>
    <None Include="README.md" />
  </ItemGroup>
  
  <ItemGroup>
    <PackageReference Include="NLog.Extensions.Logging" />
    <!-- HACK: Microsoft.Extensions.Hosting is referenced, even if it is not used, to force dll versions to be the same as in other projects. Really only needed since OneNote uses the LazyCache and NLog dependencies, which references older assemblies. -->
    <PackageReference Include="Microsoft.Extensions.Hosting" />
    <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>
    <ProjectReference Include="..\..\..\common\ManagedCommon\ManagedCommon.csproj" />
    <ProjectReference Include="..\..\..\common\Common.UI\Common.UI.csproj" />
    <ProjectReference Include="..\..\..\settings-ui\Settings.UI.Library\Settings.UI.Library.csproj" />
  </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>PublicResXFileCodeGenerator</Generator>
      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
    </EmbeddedResource>
  </ItemGroup>
</Project>