chore: enable developer tools in debug mode and update diagnostics package references.

This commit is contained in:
Zhang Dian
2026-03-10 19:07:27 +08:00
parent 44152ef731
commit d865f2aeb4
3 changed files with 8 additions and 5 deletions

View File

@@ -12,6 +12,9 @@ public partial class App : Application
public override void Initialize()
{
AvaloniaXamlLoader.Load(this);
#if DEBUG
this.AttachDeveloperTools();
#endif
this.DataContext = new ApplicationViewModel();
}

View File

@@ -15,10 +15,10 @@
<PackageReference Include="Avalonia.Controls.ColorPicker"/>
<!-- <PackageReference Include="Avalonia.Controls.DataGrid"/>-->
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<!-- <PackageReference Include="Avalonia.Diagnostics">-->
<!-- <IncludeAssets Condition="'$(Configuration)' != 'Debug'">None</IncludeAssets>-->
<!-- <PrivateAssets Condition="'$(Configuration)' != 'Debug'">All</PrivateAssets>-->
<!-- </PackageReference>-->
<PackageReference Include="AvaloniaUI.DiagnosticsSupport">
<IncludeAssets Condition="'$(Configuration)' != 'Debug'">None</IncludeAssets>
<PrivateAssets Condition="'$(Configuration)' != 'Debug'">All</PrivateAssets>
</PackageReference>
<PackageReference Include="CommunityToolkit.Mvvm"/>
</ItemGroup>