Files
ThreadPilot/ThreadPilot.csproj
2026-10-22 11:32:12 +02:00

64 lines
3.0 KiB
XML

<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows10.0.22000.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UseWPF>true</UseWPF>
<UseWindowsForms>true</UseWindowsForms>
<ApplicationManifest>app.manifest</ApplicationManifest>
<ApplicationIcon>assets\icons\ico.ico</ApplicationIcon>
<PublishSingleFile>true</PublishSingleFile>
<SelfContained>true</SelfContained>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PublishTrimmed>false</PublishTrimmed>
<TrimMode>link</TrimMode>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<!-- Dynamic PGO instruments every hot method and re-JITs it in the background, ~2 s of CPU at each start
for a tray app. Measured on a 5800X3D: startup CPU ~7.8 s -> ~6.1 s, window-open idle unchanged (~2.4%).
TieredCompilation=false saved more at startup (~5.2 s) but cost +1% of a core with the window open. -->
<TieredPGO>false</TieredPGO>
<!-- The WindowsDesktop SDK turns BinaryFormatter on for legacy clipboard/drag-drop formats; the app only
copies text, and an elevated process should not deserialize data another program can put there. -->
<EnableUnsafeBinaryFormatterSerialization>false</EnableUnsafeBinaryFormatterSerialization>
<NoWarn>CS1998;CS0067;CS0414;WFAC010;IL3000;MVVMTK0034</NoWarn>
<Version>1.7.8</Version>
<AssemblyVersion>1.7.8.0</AssemblyVersion>
<FileVersion>1.7.8.0</FileVersion>
<InformationalVersion>1.7.8</InformationalVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.0" />
<PackageReference Include="System.Drawing.Common" Version="9.0.7" />
<PackageReference Include="System.Management" Version="8.0.0" />
<PackageReference Include="System.ServiceProcess.ServiceController" Version="9.0.7" />
<PackageReference Include="WPF-UI" Version="4.2.0" />
</ItemGroup>
<ItemGroup>
<Resource Include="assets\icons\ico.ico" />
</ItemGroup>
<!-- Ensure XAML for ProcessPowerPlanAssociationView generates InitializeComponent -->
<ItemGroup>
<Page Update="Views/ProcessPowerPlanAssociationView.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Compile Remove="Tests\ThreadPilot.Core.Tests\**\*.cs" />
<EmbeddedResource Remove="Tests\ThreadPilot.Core.Tests\**\*.*" />
<None Remove="Tests\ThreadPilot.Core.Tests\**\*.*" />
<!-- The old in-app test harness runs only in Debug with the test switch; keep it out of the shipped exe. -->
<Compile Remove="Tests\*.cs" Condition="'$(Configuration)' == 'Release'" />
</ItemGroup>
<Import Project="Directory.Publish.props" Condition="Exists('Directory.Publish.props')" />
</Project>