Getting started
Useful resources
IDEs and code editors
- Visual Studio (Windows/Mac)
- Rider (Windows/Mac/Linux)
- Visual Studio Code (Windows/Mac/Linux)
Tools
๐ bridged from !dotnet@programming.dev by Tidepoo
Getting started
Useful resources
IDEs and code editors
Tools
๐ bridged from !dotnet@programming.dev by Tidepoo
Security incident update: 22โ23 October 2026
On 22 October 2026, Avalonia came under a sustained, unauthorised attack targeting several of our services. Our investigation has confirmed that the attacker gained access to the content management system (CMS) used by our marketing website.
Determine Unused Directory.Packages.props declarations via Nushell
When using Central Package Management (Directory.Packages.props holds package versions), package version declarations can remain after package references have been removed. The package versions are unused and misleading.
dotnet nuget why can be used to get a dependency tree across projects to answer how a package comes into the dependency tree. However, the extensive tree list result for a list of version declarations is not viable to simply determine what 'is in use' and what isn't.
I am sharing my Nushell snippet which answers the question of what is declared but not referenced:
nushell
# List Directory.Packages.props version declarations that are in no csproj
def "dotnet unused-dirpackprops" [] {
let defs = open Directory.Packages.props | from xml | get content | where tag == ItemGroup | get content.attributes.Include | flatten | sort --ignore-case --natural
let refs = ls **/*.csproj | get name | each { open | from xml | get content | select content | flatten | flatten | where tag == PackageReference | get attributes.Include } | flatten | uniq | sort --ignore-case --natural
$defs | difference $refs
}nushell
โฏ dotnet unused-dirpackprops โญโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ 0 โ coverlet.collector โ โ 1 โ System.Net.Http โ โ 2 โ System.ServiceProcess.ServiceController โ โฐโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Gaps: In this simple form, only covers the standard csproj package references. Package references included during build through other target or prop files are not covered (probably irrelevant for most users).
I built a small library to assert EF Core SQL query counts in integration tests (catch N+1 in 3 lines)
I kept running into the same issue when writing integration tests for ASP.NET Core APIs โ thereโs no clean way to assert how many SQL queries an endpoint executes. Most of the time it ends up being: โข custom DbCommandInterceptor โข wiring it into WebApplicationFactory โข manually counting queries So I wrapped that into a small library. Example:
await using var guard = factory.TrackQueries<Program, AppDbContext>();
var client = guard.CreateClient();
await client.GetAsync("/api/orders");
guard.AssertCount(exact: 1);Thatโs it โ no manual interceptor or log parsing. What it does: โข Counts SELECT/INSERT/UPDATE/DELETE queries triggered by HTTP requests โข Starts counting from CreateClient() (so startup/seeding queries are ignored) โข Works with any EF Core provider โข Designed for WebApplicationFactory-based integration tests GitHub: https://github.com/KiwiDevelopment/KiwiQuery NuGet: dotnet add package KiwiQuery.EFCore MIT, very small codebase. Would love feedback โ especially if youโre already solving this in a different way.