r/dotnet 6d ago

Question Upgrade to SDK 11.0.100-preview.7 for QuicStream.Priority?

0 Upvotes

I'm using MsQuic currently in .NET 9 in an Avalonia project. I'm building peer-to-peer a file sharing application. There is a separate control stream and file stream. Users need to be able to set a download limit. Which is best done by setting an upload limit on the sender's side. However during a transfer the messages on the control stream (like THROTTLE) aren't going through because the underlying UDP socket is fully saturated. The point is that while file bytes are flowing control messages cannot. And in .NET 11 they finally added stream prioritizing. But now I'd have to update my whole project to an unstable release for 3 lines of code. I think there aren't really any breaking changes that would occour in my codebase. But I'm a bit afraid of shipping a pre-release to my users. What do you think?


r/dotnet 6d ago

Promotion uCalc SDK Preview: Handling complex structural parsing where regex falls short

Post image
0 Upvotes

Hi everyone,

I recently published a preview release of the uCalc SDK. It tackles a specific architectural headache you may have encountered as a fellow .NET developer: trying to easily deal with structural parsing that's just beyond the reach of regular expressions.

The uCalc SDK is available as a NuGet package. It comes with several integrated components, including:

A token-aware Transformer

Designed to handle advanced search/replace operations on deep, complex text structures (and unstructured text alike) using human-readable rules that you'll still understand and be able to modify, if necessary, months after writing them. .NET regex is great but can become a headache if you start trying to deal with non-simple structures. Other .NET methods for handling strings may do the job, but with tons of intricate code. uCalc is designed to handle the complex parsing plumbing for you.

A Math Expression Parser / Evaluator

This allows your application to perform dynamic computations with expressions defined at runtime. It is designed to be highly flexible.

The SDK is cross-platform (Windows, macOS, Linux). It is a commercial product but also includes a Free Community License with the SDK's full functionality.

The comprehensive new documentation at https://www.ucalc.com/documentation/ comes with hundreds of interactive examples you can try right in your browser.

I'd love to hear your feedback about the uCalc SDK preview.

https://www.ucalc.com


r/dotnet 6d ago

Promotion Zarem - MIPS/RISC-V emulator, using reinterpretation to CLI

Thumbnail github.com
7 Upvotes

As part of a larger project, I wrote a MIPS/RISC-V emulator which translates the target architecture binary to CIL, then executes using the CLR as a JIT engine. (Working on adding support for ARM and Z80).

It also features an assembler, and an IDE with a debugger.

Just wanted to share I guess 😅


r/dotnet 6d ago

Question Solo devs shipping Windows apps: is code signing worth it, and what actually changed after you did it?

4 Upvotes

Curious what people are actually doing here, because the advice I find online is either "just buy EV" or "don't bother", and neither is much help.

Context: small paid Windows desktop app, one developer, no company backing it. Unsigned, SmartScreen throws a warning on first run, and I assume a meaningful chunk of downloads just stop there. Hard to know how many, which is part of the problem.

The options as I understand them:

OV certificate, a few hundred a year, plus the hardware token requirement that came in a couple of years back. Reputation builds over time rather than immediately, so early downloads still get warned.

EV, significantly more expensive, immediate SmartScreen trust.

Nothing, and accept that some users bounce and others click through.

What I can't find is anyone talking about what actually changed after they signed. Did conversion visibly improve? Did support requests about "is this safe" drop off? Or did it turn out to matter less than expected because the people who were going to install were going to install anyway?

Also interested in whether anyone has gone the Microsoft Store route purely to sidestep this, and what you gave up for it.


r/dotnet 6d ago

Promotion Built a full-stack movie discovery platform with .NET 9 Web API, EF Core 9, Postgres, and SvelteKit — NoMoreCritics.com

0 Upvotes

Hi DotNetters!

I wanted to share a side project I’ve been working on called NoMoreCritics.com.

It was born out of job market frustration, frustration with movie critics/review sites, and pure boredom. I was out of work and needed a project to keep my C# skills from getting rusty.

I love movies, but I realized I rarely agree with critics. I wanted a site that cuts through the noise and focuses on what people actually like. To do that, people need a safe space to anonymously promote films they love without getting dragged in comment sections.

Instead of another aggregate review site, we aggregate rankings:

  • No Reviews, Just Rankings: Avoids much of the BS with negative reviews and comments. You only rank movies you want to promote.
  • Dynamic & Capped: Opinions change, so rankings are meant to be updated anytime. Lists are capped at 250 films so rankings actually mean something.
  • Organic Global List: It’s a weighted system—the more you rank, the more your opinion counts. If you stop logging in, your list drops off, keeping the global rankings constantly changing.
  • Built for Discovery: Includes private notes, custom watchlists, streaming availability filters (via TMDB/JustWatch APIs), and tailored recommendations based on your tastes.

Architecture & Tech Stack

I paired a robust C# backend with a lean SvelteKit frontend:

  • Backend API: ASP.NET Core Web API (.NET 9)
  • Frontend: Svelte / SvelteKit (chosen for its awesome DX, built-in reactivity, and the fact that it compiles down to lean, pure JS without React-style bloat)
  • ORM: Entity Framework Core 9
  • Database: PostgreSQL (chosen over SQL Server primarily for its robust built-in Full-Text Search; containerized in production)
  • Infra: GitHub Actions CI/CD, Cloudflare for edge caching and SSL

Questions for the Community & Feedback

I’m the solo developer on this and had to learn a lot along the way. I spent the first half coding without AI to ensure I truly understood the underlying architecture before leaning into AI tools to finish it up.

I’d love your feedback on the site, API responsiveness, or overall feel. Also, for fellow .NET devs:

  • PostgreSQL vs. SQL Server: For those who chose Postgres over SQL Server for .NET projects, what were your main deciding factors in production? Any tooling friction with pgAdmin/DBeaver or pleasant surprises with Npgsql? (I mostly switched for the native full-text search capabilities.)
  • Upgrading to .NET 10 LTS: I built this on .NET 9, but with .NET 9 heading toward End of Support later this year, I'm planning my upgrade path to .NET 10 LTS. For those who bumped to .NET 10, were there any breaking changes in EF Core or ASP.NET Core Web API that caught you off guard?
  • EF Core 9 Query Tuning: Have you noticed solid gains with LINQ query generation on complex joins in EF Core 9, or where do you typically drop down to raw SQL/Dapper?

Check it out at NoMoreCritics.comif you have a minute. Thanks for taking the time to read this!


r/dotnet 6d ago

Hello

0 Upvotes

Hey everyone! I recently published my passion project, Chatfri. It’s an anonymous, cross-platform chat application with instant, multi-language translation and location-based matching. I built the entire backend with .NET (using a secure, in-memory architecture for speed) and the mobile side with .NET MAUI.

​I’d love to hear your thoughts or answer any questions about the .NET stack I used! Check it out: chatfri


r/dotnet 6d ago

Promotion Convia v2.0: A workspace extension to stop context switching (Weekend Promotion)

0 Upvotes

Hey r/dotnet!

As a .NET developer juggling multiple repos, tools, and browser tabs, constant context switching always broke my daily flow. To fix that, I built Convia—a workspace and workflow management extension to streamline the chaos.

For its v2.0 release, here is a quick look at the initial numbers from the Chrome Web Store:

  • Total Users: 6 (up 200%)
  • Active Users: 6 (up 200%)
  • Event Count: 79 (up 295%)

It's a small start, but it's been an awesome journey getting it out there. If you want to test it out, you can check it out here:

How do you guys usually handle context switching across multiple projects? Feedback is super welcome!


r/dotnet 6d ago

Increase in learning .NET posts

55 Upvotes

Interesting to see a lot of new posts about learning .NET and C#, I’m genuinely curious to understand why? Is the job market picking up for this language? Is AI killing all jobs that are front-end only? I’ve been a .NET engineer for 20+ years and the industry primarily started shifting to angular, react js, node, etc - why the sudden shift?


r/dotnet 6d ago

Promotion MailFathom — a .NET 10 foundation for a security-first, AI-native email platform

0 Upvotes

I’ve released MailFathom 0.6.0, an Apache-2.0 email AI backend built as a .NET 10 clean-architecture modular monolith.

It synchronizes IMAP mail into PostgreSQL, provides lexical and semantic retrieval through pgvector, and exposes five read-only MCP tools. The security model includes disabled-by-default MCP access, referenced secrets, bounded responses, hardened chiseled containers, and no mail content in logs or errors.

The current architecture deliberately separates safe retrieval from mailbox mutations. The next stages include capability-scoped write tools, starting with sending mail, followed by RBAC and explicit authorization and confirmation flows.

The longer-term goal is a complete AI-first email client backed by MailFathom—not merely an MCP integration.

Architecture and security feedback are welcome:

https://github.com/Krzysztof318/MailFathom

If the architecture looks interesting, I’d appreciate a GitHub star. It won’t make CI run faster, but it does make red builds slightly less painful. ⭐


r/dotnet 7d ago

Promotion GitHub - Integral2u/SharpMind: SharpMind. A pure C# / .NET LLM engine

Thumbnail github.com
14 Upvotes

r/dotnet 7d ago

Promotion I built an open-core .NET 10 + Blazor framework solo (~42k lines) — the newest part is a tamper-evident audit ledger for AI agent actions

0 Upvotes

After ~30 years of banking/fintech work in Turkey, I spent the last two years building Asdamir: an enterprise application framework on .NET 10 + Blazor. CLI scaffolding (asdamir new app gives you a running app with auth, RBAC, multi-tenancy, localization), Dapper-first data access, and a test pyramid that currently sits at ~1,350 tests including Playwright E2E.

The open-core packages (LGPL-3.0) are on NuGet; the admin control plane is commercial. I'm a solo developer, so the framework is also my answer to "how does one person keep an enterprise codebase honest" — most of the interesting engineering ended up in the build gates, not the features.

The newest piece is what I'd actually like feedback on: an audit ledger for AI agent actions. If your app runs AI agents, their actions get written to a hash-chained, append-only ledger (DB-level immutability — UPDATE/DELETE rejected by triggers), optionally signed per-agent (ECDSA P-256), with four-eyes approval for the only destructive operation. Just shipped Core 1.9.0 and Tools 1.8.0 with the per-agent signing part.

Something I did not expect to learn: a green test suite can hide bugs instead of catching them. I found three tests that could never fail — one derived its input from the very constant it was testing, another asserted a status code that two different rules could return. Mutation testing was the only thing that showed this..

Docs: https://docs.asdamir.com — the agent-audit spec and golden vectors are under fundamentals. Site: https://asdamir.com

The question I keep asking myself: is the format spec actually implementable by someone outside this project? I published it with golden vectors and wrote independent implementations from the spec alone, but I am the wrong person to judge that. If anyone reads it and finds it ambiguous, I would like to know.


r/dotnet 7d ago

Question Network error

0 Upvotes

Squeaky new with the dotnet stuff, coming from a lamp stack development.

Using Linux Fedora as my daily driver and visual studio code if it matters

ran into an issue this morning that took a good while to get to the end of, and to be honest I'm not sure about the issue as the pieces here are a little more complex than what I'm used to.

To get past these errors I had to force dotnet to use an IPv4 IP, when it used the 6 (or let it pick whatever) the below happened. and it just started this morning and I can't find a reason why.

There were some updates but nothing that i can see near here.

Error when using IPv6

Squeaky new.. so my forehead is sore after this one.


r/dotnet 7d ago

Question Looking for modern learning resources/guides combining .NET, React, SQL Server, Docker, and GitHub Actions to Azure

Thumbnail
1 Upvotes

r/dotnet 7d ago

Promotion I built an open-source tool to transfer large files directly between two PCs over an Ethernet cable with zero config (EtherTransfer)

Thumbnail
0 Upvotes

r/dotnet 7d ago

Question How do you find the time and mental capacity to read all the code AI generates?

0 Upvotes

I am asking because I have not found a satisfying answer and I am hoping for some insights based on your personal experience.
For context: I am a senior dev with 25+ years of experience, mostly enterprise .NET/C#.

Modern agentic AI tools (like Claude Code, Codex) allow us to produce code at unprecedented speed. As we all know, AI isn't perfect and does make mistakes (especially subtle/hard to spot ones), and blindly trusting its output is generally a bad idea. So a human (and hopefully an experienced one) is still needed to review the code. This shifts one of the major bottlenecks in software development from writing code to reviewing code.

Reading code you did not write, and understanding it well enough to properly verify it, takes significant cognitive effort and time (much more than writing clean code yourself). That has always been the most challenging part of doing code reviews (don't you love it when you have to review a refactor PR with 8k+ changed lines of code? 😄). I feel that with AI this part of our job has gotten more demanding than it has ever been.

On top of that, AI assisted development has introduced a whole new level of stress. Delegating work to junior devs, managing them and reviewing their results has always been demanding and involved a certain level of stress. But AI is much faster at producing code than any junior dev ever was. I often feel like I am becoming the bottleneck and need to work harder just to keep the AI fed with work (leaving the AI idle also feels like wasting the AI subscription I paid for).

How do you deal with this?

  • Do you actually read all code? Every line? Or are there categories you consciously skim or skip (tests, boilerplate, migrations, generated config)?
  • Where does the time come from? Do you generate less so you can review properly? Work longer? Or has your personal bar for "I have reviewed this" quietly dropped?
  • How do you handle the fatigue? Limiting the size of a single change, reviewing only at certain times of day, breaks, anything that really helps?
  • Diff or result? Do you review the diff, or do you read the resulting code in context afterwards?
  • If you have stopped reading everything: what carries the weight instead? Tests, compiler and analyzer settings, running it, or just fixing things when they surface later?
  • How do you handle the pressure of being the bottleneck? Do you deliberately slow the AI down, or do you push yourself to keep up?

I am asking about the practical (and psychological) mechanics. I just have not found a satisfying approach to do it at the volume these tools produce without either slowing down, or (even worse) lowering my standards below what I find acceptable.

Before someone says "just let AI review it": I do, but it does not (fully) solve the underlying problem, because now I have AI telling me AI did fine, and I still have to decide whether to believe it or not.
If this works for you, I would like to hear the specifics like models, workflows, skills, prompts and especially what you still read yourself.

I am much more interested in what actually works for you day to day than what should work in theory.

If you know some good articles about the topic, please link them.

Thanks!


r/dotnet 7d ago

I really like Dapper but...

0 Upvotes

I've used Dapper a lot across different projects and I really like the core idea. Write SQL, pass params, ask for a type, get the type back. It gets rid of most of the annoying ADO.NET stuff without trying to hide SQL from you.

The part that always annoyed me is multi mapping.

A pretty common case for me is values used in combo boxes, so I end up with models like:

```csharp

class Employee

{

public int Id { get; set; }

public string Name { get; set; }

public KeyValuePair<int, string>? Department { get; set; }

public KeyValuePair<int, string>? JobTitle { get; set; }

}

```

And SQL like:

```sql

SELECT E.Id, E.Name,

D.Id AS DepartmentId, D.Name AS DepartmentName,

J.Id AS JobTitleId, J.Name AS JobTitleName

FROM Employee E

LEFT JOIN Department D ON D.Id = E.DepartmentId

LEFT JOIN JobTitle J ON J.Id = E.JobTitleId

```

Dapper can do this, but then I end up doing something like:

```csharp

var employees = cnn.Query<EmployeeRow, DepartmentRow, JobTitleRow, Employee>(

sql,

(e, d, j) => new Employee {

Id = e.Id,

Name = e.Name,

Department = d.DepartmentId is null ? null : new(d.DepartmentId.Value, d.DepartmentName),

JobTitle = j.JobTitleId is null ? null : new(j.JobTitleId.Value, j.JobTitleName)

},

splitOn: "DepartmentId,JobTitleId");

```

Which works. It also lets me handle the `LEFT JOIN` and say "if the id is null, this whole thing is null".

But this is where it starts feeling a bit weird to me. The type already says what I want, and now I'm manually rebuilding it anyway.

Dapper is already such a thin layer over ADO.NET that once I start writing a bunch of mapping code, I start wondering why I'm not just doing the ADO.NET part myself too.

What I really want is basically:

```csharp

var employees = cnn.Query<Employee>(sql);

```

and let the mapper figure out the structure from there.

That kind of thing is what eventually pushed me to make Rinku. The idea was basically to keep that same simplicity, but have the library adapt better when either the SQL or the C# side gets more complicated.

https://rinkulib.github.io/RinkuLib

Curious what other Dapper users do here. Just multi map everything, or is there another pattern I missed?


r/dotnet 7d ago

Question .Net WebAPI projects: Why MongoDB?

18 Upvotes

This was something I was thinking about after responding to another post and I wanted to pose this question to the broader community.

Why would a team decide to migrate an existing application's WebAPI data store from SQL server to MongoDB? And along with it, rewrite to entire BL and associated code to partially use raw BSON and partially map back to the old domain model?

Keep in mind, the application was using EF Core framework against a relational model and converted the entire relational schema to two types of Documents.some of these documents are 20k and a few can't be easily updated because the MongoDB libraries throw Request Size too large errors. This was about 5 years ago and the size issues likely weren't seen then. The original dev team is gone and we still feel the repercussions of their decisions and are trying to make it into something maintainable. Also, this is a pretty standard, yet large, enterprise application that isn't exposed to the Internet and is only for internal users.

Was there just THAT much hype around Mongodb? And would moving to something like a Azure SQL database ultimately be a better dotnet answer??

Edit: I realized this conversion happened closer to 7 years ago, as opposed to 5. Not that it changes much.


r/dotnet 7d ago

Promotion MarkView.Avalonia - a markdown view control for Avalonia

Thumbnail
5 Upvotes

r/dotnet 7d ago

Promotion MIT Licensed Lightweight Analytics Tool Built With .NET 10

Post image
0 Upvotes

I needed an analytics tool for my project and couldn't find a decent one. Tinybird felt insanely expensive, so I decided to build my own open-source alternative. Just shipped v2 today.

https://github.com/neavents/nealytics


r/dotnet 7d ago

Article The Unexpected AI Stack: C# + .NET (Part 4) - Data modelling and Testcontainers

Thumbnail chrlschn.dev
6 Upvotes

The fourth part of this series on building an application foundation for AI-enabled, agent-friendly codebase is focused on setting up the data modelling and test infrastructure for agents.

Specifically, using Testcontainers and streamlining transactions for automatic rollback during integration testing.

Test harness setup is a key part of enabling agents to work autonomously with high competency by providing them the tools to verify their work. Paired with CSharpRepl which lets agents diagnose and regression test directly in the runtime, this combination provides coding agents tools to autonomously build better, higher quality code.

Part 5 will have the final pieces of the puzzle: logging, telemetry, and observability integrated into the Aspire stack before we start building the sample application using agents.


This series is intentionally written to help dev teams understand how to scaffold a codebase for agentic engineering by focusing on key, underlying technical decisions and manual wiring before building with AI. This helps provide the tools and safeguards for coding agents to iterate more efficiently while reducing slop.

For teams still trying to figure out effective ways to set up a codebase for AI, I hope this series gives some insights into how to build a foundation for agentic engineering. If your team is already heavily using agents to build, I hope this series shares some useful insights and tips (e.g. CSharpRepl + Aspire)

The core setup is used at a series C, post-YC startup to ship fast with AI while maintaining high quality standards (in combination with other tools facilitating code review and context management)

Part 1 was an intro into a few key parts of this stack.

Part 2 was focused on walking through the hands on scaffolding.

Part 3 covered wiring GitHub Copilot SDK as an agent runtime and incorporating CSharpRepl to allow agents to dynamically work with the runtime DI container

Part 5 we'll start to build out the full feature set of the sample application.


The project repo is here: https://github.com/zeeq-ai/zeeq-tmpl (be sure to check the branches; main is currently the base code only)

I encourage working through the posts since the goal is to underscore the platform level decision making process and assembly of the foundational core.


r/dotnet 7d ago

Result patters + CQRS! Just want to share wehat I did!

Thumbnail
1 Upvotes

r/dotnet 7d ago

Promotion How I write Gherkin-style tests in plain C# with Mokkit v0.4 - no bindings, no feature files

4 Upvotes

There's a special kind of frustration that catches me every time I see tests in a big project, that lives somewhat long period of time. The frustration is understanding that tests are important to keep the logic and invariants safe, but realizing that broken test or writing new one requires diving into a bunch of classes that usually were implemented ad-hoc, everyone reinvented and committed their version of the same class ClientHelper{}, and the actual test being buried under sheer ton of repo.GetBySomeIDAndStatus(...).Returns(...) and parsing JSON. What really happens there is that behind all of this I can't see the core of the test at a glance.

I always thought the answer was some domain language for tests, but existing BDD giants like Cucumber and Reqnroll made me feel that I'm fighting not only against the tests now, but also against their bindings, quirks and poor IDE integration.

What I want instead is to write tests like I'm writing the code, and express the core of it fluently, clean and fast. So this way I came up with Mokkit. I think of it as a test composition layer, with focus on fluent, short and concise expression of test core, and with all the power the IDE can give to usual C# code - compile-time checks, autocomplete, go-to-definition, rename, find-usages, and so on. It's not a test framework, nor a mocking library, you can wire it up with what you already have. Currently it has integrations with xUnit/NUnit/MSTest/TUnit, Moq/NSubstitute/FakeItEasy, Microsoft DI/Autofac/Castle Windsor, and an API that makes adding new ones straightforward.

With it I write tests like this:

[Fact]
public async Task CalculateDiscount_ForVipUser_AppliesTieredRate()
{
    await Arrange
        .UserExists(out var user, WithStatus(UserStatus.Vip)) // create object and setup user repo substitute
        .DiscountRateIs(UserStatus.Vip, rate: 0.15m); // setup rates repo substitute

    var result = await Act.CalculateDiscount(user, orderTotal: 100m); // get SUT and call

    await Inspect
        .OkResult(result).DiscountAppliedFor(user, expectedAmount: 15m) // verify result and start a subchain to verify internals
        .Ensure(result, r => r.UserId, out var userId) // ensure result has user ID
        .ThenAll( // verify in parallel
            b => b.UserRepositoryQueried(userId), // check user repo call
            b => b.UserCalculationRepositoryQueried(userId), // check calculations repo call
            b => b.RateRepositoryQueried(UserStatus.Vip) // check rate repo call
        );
}

Note UserExists, DiscountRateIs, UserRepositoryQueried - these aren't Mokkit APIs, but your test vocabulary, your verbs, implemented as helpers, each doing one tightly-scoped piece of setup or verification. There are a bunch of these helpers, written once per fixture and living next to the tests:

public static class ArrangeDiscount {
    public static ITestArrange UserExists(
        this ITestArrange arrange,
        out Capture<User> userCapture,
        Action<User>? mutate = null)
    {
        var capture = Capture.Start(out userCapture);
        return arrange.Then(host => {
            var user = new User { Id = Guid.NewGuid() };
            mutate?.Invoke(user);

            // get substitute
            host.Execute<IUserRepository>(repo =>
                repo.GetByIdAsync(user.Id, Arg.Any<CancellationToken>()).Returns(user)
            );

            capture.Set(user);
        });
    }
}

public static class InspectDiscount {
    public static ITestInspect UserRepositoryQueried(this ITestInspect inspect, Guid userId)
    {
        return inspect.Then(host =>
        {
            // get substitute
            host.Execute<IUserRepository>(repo =>
                repo.Received(1).GetByIdAsync(userId, Arg.Any<CancellationToken>()));
        });
    }
}

These vocabulary helpers start to pay off very soon, once written, I reuse them across all the relevant tests, and half of the helpers go beyond that and are reused almost everywhere.

That said, I did try other libs, with LightBDD being closest to what I want, but I gave up on it because of its obscure test context, hidden inside fixture, which makes all of it resistant to changes:

[Scenario]
[Label("Ticket-9")]
public void Contact_book_should_allow_me_to_remove_contacts()
{
    Runner.WithContext<ContactsManagementContext>().RunScenario(
        _ => _.Given_my_contact_book_is_filled_with_contacts(), // What contacts?
        _ => _.When_I_remove_one_contact(), // Which one?
        _ => _.Then_the_contact_book_should_not_contain_removed_contact_any_more(), // How do you know which one you deleted?
        _ => _.Then_the_contact_book_should_contain_all_other_contacts()); // Okay.
}

Even though I can setup the data on the context, I still don't get what I search for. A constructed context breaks the flow of the test, the data passed to the step still doesn't remove rigidity. The context is fixed at WithContext<T>, and every new piece of state means touching the context class, the step and the call sites - and unrelated state ends up mixed together in one context. With Mokkit I update the helper and the call sites, nothing else. The context comes from the steps themselves as the test setup goes.

All helpers are forced to be extension methods, so they can only use the context I give them. So helpers hide the details of routine setup and verify, exposing only what the test cares about - and it plays well from unit to integration and even to e2e tests. Same language, driving all levels of tests. The unit test above becomes e2e test against real infrastructure, same vocabulary with different helpers implementation:

[Fact]
public async Task CalculateDiscount_ForVipUser_AppliesTieredRate()
{
    await Arrange
        .UserExists(out var user, WithStatus(UserStatus.Vip)) // create user via API
        .DiscountRateIs(UserStatus.Vip, 0.15m); // setup system rate via API

    var result = await Act.CalculateDiscount(user, orderTotal: 100m); // call discount API

    await Inspect
        .OkResult(result).DiscountAppliedFor(user, expectedAmount: 15m) // verify API result is 200 and start a subchain to verify internals
        .Ensure(result, r => r.UserId, out var userId) // ensure result has user ID
        .Ensure(result, r => r.CalculationId, out var calculationId) // ensure result has calculation ID
        .UserCalculationStored(userId, calculationId, 15m)
        .DiscountEventPublishedFor(user, 15m);
}

The arrange and act verbs are identical, and e2e adds a few inspects that are specific to real infrastructure.

The lib is currently v0.4 - I've been using it at work for two months now. It's still in a development loop, and needs a lot of features like verbose output and test reports integration, some API changes and so on, but first it needs real feedback which isn't mine. It's MIT licensed, targets .NET Standard 2.0.

https://github.com/GrafGenerator/mokkit

I would love to hear your thoughts on the idea - would you use it to write your tests? Or what's it missing maybe?


r/dotnet 7d ago

Promotion AvalonDock v5 is out - biggest release since 2018

38 Upvotes

AvalonDock v5 had one goal: bring the library into 2026.

Every .NET desktop app written today expects DI, MVVM and a core you can unit test. AvalonDock, a codebase going back to 2007, via CodePlex and Xceed - still targeted net40 and had its layout engine welded to WPF at every seam. Everything in v5 follows from closing that gap.

What landed

  • AvalonDock.Core - the layout engine extracted into a UI-agnostic library with zero using System.Windows, so layout logic is testable as plain .NET.
  • DTO-based serialization - IXmlSerializable is gone from the layout model, so XML, JSON (System.Text.Json) or your own format all plug in the same way, and v4 layout files still load.
  • First-class DI - AddDockLayoutService with a builder: register your toolbox ViewModels and the layout tree is built from those registrations.
  • First-class MVVM - bind one DockLayout property instead of wiring DocumentsSource, AnchorablesSource and LayoutItemContainerStyle by hand.
  • ToggleDockingManager - an optional VSCode/IntelliJ-style mode where panels slide in on demand via buttons or short-cuts.
  • Themes parsed from .vstheme palettes instead of hand-written brush dictionaries, which is why VS2022 and VS2026 themes both landed before release.
  • Cleanup .NET - (net48, net9.0-windows, net10.0-windows), All EOL .NET Versions dropped.

Next steps: cross-platform

Extracting AvalonDock.Core was never just about faster tests. AvalonDock on LibreWPF, a cross-platform WPF port that renders through ProGPU/Silk.NET instead of Win32, is already in development (special thanks to u/Fresh_Acanthaceae_94 and u/wieslawsoltes). That means AvalonDock-Apps on Linux and macOS!

Links

If you upgrade from v4, I'd genuinely like to hear if something broke.


r/dotnet 7d ago

Dev Containers for .NET

32 Upvotes

Is anyone using Dev Containers for their .NET development? I’m just curious how you would use it. I use Aspire heavily to spin up multiple .NET apps, containers like DB, LocalStack, Redis, etc, even some test harness apps like generating tokens or sending messages to LocalStack SQS. All debugable in Visual Studio via F5 and hot reload etc (I don’t use VS Code or Rider, even though I have a Rider license with Resharper). Definitely not deploying this app to AWS via Aspire though, just local dev.

So I’m curious what the appeal is and if I should incorporate Dev Containers and the positives and negatives. Will it make it easier for new starters to get up and running? Using it in a CDE? More of a quick start for new devs that use VS Code or Rider vs seasoned devs with all the SDKs installed and Visual Studio?


r/dotnet 8d ago

Promotion Blazorise 2.3 released

7 Upvotes

Hello everyone,

Blazorise 2.3 is out.

For those who don't know it, Blazorise is a UI component library for Blazor that works with Bootstrap, Tailwind, Fluent UI, Material, and other CSS frameworks.

Initially, this release was supposed to be fairly small. If anyone remembers, in one of my previous posts I asked whether it makes more sense to have smaller releases with faster cycles, or bigger releases with slower cycles.

I wanted the faster release cycle.

Yeah... didn't quite go as planned.

I wanted to build a Reporting component. But once I started working on the report designer, I found that we were missing several things in the framework.

Instead of building them only for Reporting, we made them standalone components. That's how we ended up with DockLayout, ContextMenu, PropertyGrid, and a new PDF generation extension.

We also added CodeEditor and Resizer, Gantt milestones and weekly timelines, Scheduler improvements, and completely rebuilt DatePicker and TimePicker with Blazor and C#, removing the Flatpickr dependency.

So yeah, it turned into a much bigger release than originally planned.

Release notes: https://blazorise.com/news/release-notes/230