Add build and run scripts; drop the broken Avalonia.Diagnostics reference
A wrapper around `dotnet build` earns nothing, so build.ps1/build.sh are the full local gate instead — tool restore, package restore, format check, build, test — in the order that fails cheapest first, with a non-zero exit on failure. run.ps1/run.sh default to Debug and pass extra arguments through to the app. Both flavours ship because the Desktop head targets Windows, Linux and macOS. Writing them immediately paid for itself: the very first run failed restore on Avalonia.Diagnostics 12.1.1, which does not exist — the package stops at 11.3.x because Avalonia 12 moved the inspector into a separate tool with its own installation. The reference had survived because it sat behind Condition="'$(Configuration)' == 'Debug'", and `dotnet restore` evaluates with the default configuration while every build so far had passed -c Release. So `dotnet build -c Release` worked and a bare `dotnet restore` did not. Reference removed rather than replaced: AvaloniaUI.DiagnosticsSupport pulls in a separately installed tool, which is not a dependency to add to a skeleton without asking. README and CLAUDE.md no longer promise F12, and both traps are written down where the next person will hit them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
3db9d4dfc6
commit
aeafe0af36
@@ -28,8 +28,13 @@
|
||||
<PackageReference Include="Serilog.Extensions.Logging" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(Configuration)' == 'Debug'">
|
||||
<!-- F12 opens DevTools, which is the fastest way to see :compact/:medium/:expanded toggle. -->
|
||||
<PackageReference Include="Avalonia.Diagnostics" />
|
||||
</ItemGroup>
|
||||
<!--
|
||||
No Avalonia.Diagnostics here: it stops at 11.3.x and has no Avalonia 12 build. Avalonia 12
|
||||
moved the inspector out of the framework into a separate tool with its own installation
|
||||
(AvaloniaUI.DiagnosticsSupport + `.WithDeveloperTools()`), so there is no built-in F12.
|
||||
|
||||
Note also that Condition="'$(Configuration)' == 'Debug'" on a PackageReference is a trap:
|
||||
`dotnet restore` evaluates with the default configuration, so the package still has to
|
||||
resolve even if nothing ever builds that configuration.
|
||||
-->
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user