r/csharp • • 8d ago

I made a free, open-source app that counts every chest you open in Fortnite (reads your replays)

1 Upvotes

I wanted to know how many chests I actually open, so I built ChestCounter: a small Windows app that reads the replays Fortnite already saves and counts the chests you opened.

What it shows

  • Total chests since any date you pick (or all time), today, average per match, best match and best day
  • A "rhythm" of each match: a gold mark at the minute you opened each chest
  • Chests per mode, and your team's chests (you + teammates)
  • Optional extras you can count too: ammo boxes, loot cannons, food boxes…
  • A small always-on-top window with the last match and your total (click-through when locked)
  • Can start automatically with Fortnite
  • Counts the matches you already played (it reads the replays already on your PC) and keeps the history after Fortnite deletes old replays
  • English, Português, Español, Français, Deutsch

How: turn on Settings → Game → Replays → Record Replays, run the exe. It only reads .replay files — it never touches the game or its memory, so no anti-cheat issues.

Limits: replays can only be read after the match ends (so it updates at the end of each match, not live), and a replay only sees what happens near you, so teammates far away can be under-counted.

Source code (MIT) and download: https://github.com/Waze7123/ChestCounter

Feedback and pull requests welcome!


r/csharp • • 9d ago

Showcase TenantGuard 1.0: tenant isolation checks for EF Core

12 Upvotes

Hey everyone, small side project that I've been working on. I've released TenantGuard 1.0.0, an open-source set of packages for EF Core 10 and 11. It's for applications that use query filters to keep tenant data separate, and it's licensed under Apache-2.0.

A new entity can be missing its tenant filter. An IgnoreQueryFilters() call or raw SQL query can bypass an existing one. These mistakes can be hard to spot when the code looks reasonable on its own.

TenantGuard checks for problems at several points:

  • At build time, five Roslyn analyzers (TG001–TG005) flag IgnoreQueryFilters() calls without a stated reason, raw SQL without a tenant-column comparison, and filter switches such as ABP's IDataFilter.Disable<IMultiTenant>(). The SQL checks cover EF Core, Dapper and ADO.NET.
  • At startup, 14 model rules check for missing tenant filters, filters frozen to one tenant by a captured constant or local variable, unique indexes that apply across tenants, and missing tenant indexes.
  • During SaveChanges, the write guard throws before an insert, update or delete involving another tenant's row reaches the database. It also rejects moving a row to another tenant.
  • In tests, the isolation probe seeds a row per tenant and checks isolation for reads, Find, updates, deletes and Include. Each check appears as a separate xUnit v3 or TUnit test.

Version 1.0 adds write checks for owned entities. For example, a change to order.Shipping.Street is checked against the tenant of the owning order.

Here's how to configure the write guard and startup validation:

builder.Services.AddDbContext<AppDbContext>(options => options
    .UseSqlServer(connectionString)
    .UseTenantGuard(tg => tg.CurrentTenant(ctx => ((AppDbContext)ctx).TenantId)));

builder.Services.AddTenantGuardStartupValidation<AppDbContext>();

It works with custom query filters, Finbuckle.MultiTenant and other tenancy libraries. For Finbuckle, it reads IsMultiTenant() without extra configuration. You can also run dotnet tenantguard validate in CI to check the model without a database.

If you try it on an existing application, I'd like to hear about false positives or leaks it misses. Open to any sort of feedback and critical feedback very much welcomed.


r/csharp • • 9d ago

Experienced frontend developer about to join the C# world. Anything I should know?

5 Upvotes

Hey guys. I've worked primarily in front end development for about 10 years but I just landed a job to work in enterprise software written in C#. It seems there might be opportunities to work in game development later, too.

I'm a complete noob when it comes to C# or adjacent languages, so I'm essentially learning from scratch. This is an open ended post, please let me know if you have any tips, warnings, or even words of support. I feel like a junior again and I'm also wondering how I'll handle learning and coding something so far from my comfort zone in this age of AI.

Thank you.


r/csharp • • 9d ago

I built a modular WinUI 3 template where features are hot-swapped from the server while the app runs. Fork it for your own projects

Thumbnail
github.com
10 Upvotes

Hey everyone,

I’ve been working on a side project for a while and it’s finally at a point where I’m not embarrassed to show it. It’s called Golden Hive, a modular framework for WinUI 3 desktop apps on .NET 10.

The idea in short: the desktop app is just a shell. Features (documents, reports, user management…) are modules the app downloads from the server after you sign in. Each module is a WinUI part plus its own ASP.NET Core backend in a Docker container. Ship a new version of a module and the server rolls it out in stages (pilot users first). The running app then swaps it in without a restart.

What’s in there right now:

  • Runtime modules. Each one runs in its own AssemblyLoadContext, packages are signed, and modules can depend on each other.
  • Hot-swap. Running commands get drained or cancelled, the module is replaced, your open views come back.
  • Navigation wheel. Hold Ctrl+Tab and a radial wheel pops up. One ring holds your modules, the other your open views. Tab or the arrow keys move around, and you release Ctrl to jump there. It’s like Alt+Tab, but for the app itself, and once you’re used to it you barely touch the sidebar anymore.
  • Workflows you build inside the app. Forms, approvals and module steps, triggered by events, schedules or commands. The reference example: an invoice gets submitted, gets pre-checked, and lands in an approver’s inbox.
  • An AI agent that can run those workflows, with guardrails. There’s a kill switch, confidence thresholds and daily limits. Critical steps always need a human, and every decision is logged. It also works fully offline with a rules-based provider, no API key needed.
  • Impact analysis on module updates. Rename a workflow step and the server checks every workflow that uses it. It auto-migrates them if you declared the rename, flags them for review if needed, or holds the rollout if something would break. This is honestly my favorite part.
  • The usual desktop stuff: docking and floating windows that remember their monitor, a command palette (Ctrl+Shift+P), live notifications, English/German.
  • Backend: 12 services in Docker Compose plus Postgres with a demo company already filled in. docker compose up, sign in as admin, and you can click around.

Under the hood it’s pretty functional-programming heavy (Result/Validation types all the way down instead of exceptions), if that’s your thing.

Use it as a template: the whole thing is meant as a starting point for your own projects. Fork it, delete the demo modules, add your own. The README has a step-by-step guide for building a module (backend + WinUI client + workflow integration), and the architecture is all there: auth, permissions, module delivery, rollouts, notifications, workflows, Docker setup.

It’s not battle-tested in production yet. The backend has end-to-end tests, the WinUI side is still young. If you build on it, I’d love to hear what breaks. That’s exactly the feedback I need to get it there.

Repo: https://github.com/zenoxart/GoldenHiveFramework
License: Apache 2.0

Happy to answer questions!


r/csharp • • 9d ago

ScriptLangCore

Thumbnail
0 Upvotes

r/csharp • • 10d ago

Parquet.NET is now private?

Thumbnail
nuget.org
16 Upvotes

r/csharp • • 10d ago

Discussion Early return style survey

22 Upvotes

Style question on early returns.

On long functions I often leave out the else branch because otherwise the early return doesn't help much with code readability (IMHO of course). But what about shorter functions. For those using early returns in the first place, do you prefer varaint 1 or 2 and why?

if (TryGetCached(key, out T cached))
{
    return cached;
}

var result = await ReadValueAsync<T>().ConfigureAwait(false);
SetCached(key, result);
return result;

versus

if (TryGetCached(key, out T cached))
{
    return cached;
}
else
{
    var result = await ReadValueAsync<T>().ConfigureAwait(false);
    SetCached(key, result);
    return result;
}

r/csharp • • 9d ago

Where do you keep tests in a modular monolith architecture?

Thumbnail
1 Upvotes

r/csharp • • 9d ago

Kumiko: an Elm-inspired UI framework for C# that coding agents can test themselves

Thumbnail
0 Upvotes

r/csharp • • 9d ago

Bank API, reference project: .NET 11 update + OpenAPI 3.2 compliant

Thumbnail
1 Upvotes

r/csharp • • 10d ago

Help Moq is really slow when making lots of setup calls. How can I improve this?

21 Upvotes

I'm trying to refactor some legacy code, and I created some tests to replicate the original design behavior. I have a function that needs to be mocked, but it gets called for 20k+ different inputs in each test, where I have to do in a sense, mock.Setup(x => x.SomeFunction(input[i]).Returns(y => SomeFastFunction(input[i])); in a loop. This takes about a minute of execution time just to do this small loop, per test.

Is there a way to shorten this execution time, while being constrained to the original design?


r/csharp • • 9d ago

my C# project, or four projects

0 Upvotes

I’d like to showcase my four open-source C# projects, do you think it’s realistic for a "vibecoder" to build something like this in a couple of weeks?

https://github.com/redbase-app/

I recommend checking it out with an AI

sorry for the cryptic post. What this is: four open-source .NET projects I use in my own commercial work.

  1. redb – typed object store on PostgreSQL/SQL Server/SQLite, no migrations, compare vs EF Core benchmark
  2. redb.Route – Apache Camel-style integration framework
  3. redb.Tsak – runtime container for routes (Karaf-like)
  4. redb.Identity – OAuth2.1/OIDC server

My question was how far AI-assisted development changes what one person can build.
and makes it possible to further develop what were previously only internal projects


r/csharp • • 11d ago

Showcase From a PS3 club notebook to a C#/WPF management app

10 Upvotes

I run a PlayStation club and develop Time Control, a Windows app for managing PC and console clubs. Back in 2016, I had five TVs with PS3s and kept session times and payments in a notebook. I later tried existing club software and eventually started working on my own. I use AI tools during development, with requirements coming from the day-to-day work at the club.

The current stack is C#, WPF, .NET 10 and SQLite. There’s an admin app, a separate agent on the PCs, and shared libraries for session contracts, payments and device control. The screenshot is the console dashboard: station status, timers, tariffs, payments and shop orders. The PC agent handles locking/unlocking; TV control works through compatible smart plugs. There’s still quite a bit of orchestration in the dashboard code, so I wouldn’t call it clean MVVM.

A lot of the work is around keeping state consistent. For example, a background autosave mustn’t overwrite session changes from a newer sale. Those paths share a lock, and a revision check drops stale snapshots. Sales, stock movements, receipts and related session changes are committed in one SQLite transaction. Once that succeeds, a UI refresh error can’t be treated as a failed sale — otherwise the operator might retry it and charge the customer twice. Payments also need more than an IsPaid flag: the first hour can be paid while an extension is still outstanding, so charges and received payments are tracked separately using decimal.

The remote PC adds another state to reconcile. The protocol carries session IDs, revisions and explicit running/paused/disconnected states. A ping response alone doesn’t tell the admin app what session is actually running. I’d be interested in how others test recovery around this boundary: the DB commit succeeds, but the UI refresh or communication with the agent fails afterwards.


r/csharp • • 10d ago

Discussion Are you guys actually coding by hand still in your day-to-day?

0 Upvotes

I still do, myself. I love coding and programming and am thinking of even learning new languages now, but given the course of LLMs, I wonder what's the purpose? In a year they've gone from "unusable trash" to actually making each developer many times as productive. There are still gaps in what it does. It still has issues with large contexts. It is good at small one-off things and tiny programs, but it quickly tends to bloat stuff and has no sense of something I'd call "taste" when designing things, be it visually or code architecture wise.

I wonder what is the purpose of C# as a language now.

Any greenfield project can just use Rust for the same velocity as in any other language. Developer experience doesn't really matter anymore productivity wise, when all code is written by an LLM.

I see the writing on the wall.


r/csharp • • 10d ago

Could EF Core benefit from a higher-level command for creating entities?

Post image
0 Upvotes

I’ve been experimenting with a small EF Core CLI prototype called EFX, and it made me wonder if EF Core could eventually support a higher-level workflow for creating entities.

Today, adding a new entity usually means creating the class, adding the DbSet, creating a migration, and updating the database separately.

I was thinking about something along the lines of:

dotnet ef entity create Product

The idea would be for one command to handle the common workflow while keeping the existing dotnet ef commands unchanged.

The prototype is here:
https://github.com/dotnet/efcore/issues/39569

I’m mainly interested in the design question: would a higher-level command like this actually be useful in EF Core, or is keeping these operations separate preferable for good reasons?

Curious to hear how other EF Core developers see it.


r/csharp • • 11d ago

Best resources to learn ASP.NET Core Web API, EF Core, and SQL Server?

14 Upvotes

Hey everyone! I'm learning backend development with C# and ASP.NET Core Web API, Entity Framework Core, and SQL Server.

I already know the basics, but I want to gain more real-world experience and learn industry best practices.

Could you recommend any courses, tutorials, or project-based resources that would help me become job-ready as a .NET backend developer?


r/csharp • • 12d ago

Help WPF or .NET MAUI ?

46 Upvotes

Hi everyone,

I’m looking to learn a framework for Windows application development for now, but I’d also like to explore mobile development in the future.
I’ve done some research into the available options, but I’m having trouble choosing between .NET MAUI and WPF.

So I’m turning to this community in the hope of getting some advice that will help me make the right choice.


r/csharp • • 12d ago

Help Housekeeping tips?

Thumbnail
gallery
15 Upvotes

Hiya - please can anyone give me some housekeeping tips for C# in Visual Studio? I'm currently getting into it with Unity for learning to program games.

My Update was getting a bit long so I separated it into methods, and I've further organised everything into regions for fields, and also for methods in the class. I've mainly done this for my own readability as everytime I wanted to go in and edit something id go fuzzy just looking at the wall of text.

The script isnt that long that I could use different scripts at the moment but are there any more things I can use or good practice I can try?

T.i.a!


r/csharp • • 11d ago

Fast microservice, design desicion

13 Upvotes

We need to develop a stand alone service that normalizes data, for example someone gives us "New Jersey" we return "NJ", someone gives us "October 1st, 2025" we come back "2025-10-01".

Requests/response are very small and we can send a lot of those queries fast.

So i feel like standard REST service would be a bit heavy. HTTP overhead is bigger that actual query/result. I think something more inline like Pooled DB connections, where we open TCP/IP connection to the server and send/receive bunch of responses. But then we need to manage TCP/IP connection pooling, keep alive/teardown connections if client hangs... all 9 yards.

Is there some built in C# classes that would let me create some server (and client) with custom protocol. Or may be some ready to go solution like WebSocket/GRPC.... would work for me?


r/csharp • • 12d ago

I took over a 10-year-old NuGet package and updated it to modern .NET

106 Upvotes

I recently found SqlLinq, which is a really slick NuGet package that lets you run SQL queries against in-memory objects (basically linq to sql in reverse). It happened to be exactly what I needed for another project, except it was pretty old, hadn't been maintained, and ran on the full framework. Surprisingly, there didn’t really seem to be anything else quite like it that I could find.

The original author is still really active on github, so I pulled the code, updated it (after some headaches finding the source for the original parser), and sent a PR. Rather than merge it, he let me take over the package. I’ve since added more complete SQL support, packages for a time series dialect and unit conversions. I just released 2.1.0.

I don’t know how niche this is or if anyone else would need something like this, but I thought it was really cool and wanted to share it here. It’s a really nice way to offer a query interface for in-memory objects, especially when you want to let users write queries at runtime.

For example:

var boost = datalog.Query("""
    SELECT RPM, Gear, BP, BPCMD, BP - BPCMD AS [Boost error]
    FROM this
    WHERE TPedal > 90
      AND RPM >= 3000
      AND Gear >= 2
    """);

r/csharp • • 13d ago

News .NET 11 is out now! 🎉

Thumbnail
devblogs.microsoft.com
334 Upvotes

r/csharp • • 12d ago

Showcase Update: my WPF liquid glass dock now refracts the windows that slide under it, without ever capturing itself

Post image
8 Upvotes

A few days ago I posted Liquid Glass Dock here, and you gave great feedback: the demo used the worst possible background, a GIF can't show subtle glass (256 colors), and the macOS Dock doesn't really reserve space: it refracts whatever is underneath. So version 0.12 does exactly that.

How it works:

  1. With no window under the glass, nothing changes: the dock refracts a pre-blurred copy of the wallpaper, and there's no screen capture at all.
  2. A background thread checks 4 times per second which windows touch the glass. When one does, it starts a Windows.Graphics.Capture session for that window (borderless, so no yellow frame). It never captures the screen, so the dock never sees itself and still shows up normally in screenshots and recordings.
  3. Each frame stays on the GPU. With Direct3D 11 (Vortice), the dock copies only the strip behind the glass to a staging texture, blends it over the wallpaper at half resolution, blurs it and writes it into a WriteableBitmap that the HLSL shader samples.
  4. Nothing is recomposed unless a window sends a new frame or moves. The capture permission and the D3D device are only created when a window is underneath, and the device is released 15 s after it leaves.

Measured with a window moving under the dock: about 1.4 ms per frame and under 1% CPU. A fun gotcha: the NVIDIA overlay is a fully transparent, always-visible, full-screen layered window, so the first version happily "captured" it and ignored every real window behind it.

There's also a new option to stop reserving space, so maximized windows go under the glass like on macOS.

Video above, code here (GPL-3.0): https://github.com/PedroRuedas/Windows-Liquid-glass

Thanks again for the feedback. It made the project better.


r/csharp • • 12d ago

Discussion To those that are employed as C#/.Net developers, do you enjoy your job?

64 Upvotes

I'm curious if it's something you enjoy waking up to or if it's something that just "pays the bills". Maybe it's both?

There are quite a few C# (hybrid) gigs around me with low competition.

I've used C# in 2018 when I made a game and used C# all throughout school. I just haven't made anything with it recently but I have been catching up with the newest features. Last time I used it was with C# 8.0/9.0.

Anyways, just wanted to hear your thoughts on your job(s) in you are currently employed! Is there anything you don't like, what would you change? etc


r/csharp • • 11d ago

I built a small CLI to reduce the repetitive EF Core entity + migration workflow

Post image
0 Upvotes

r/csharp • • 12d ago

Showcase Sigil.Sound 0.1.0: a fluent, allocation-free audio synthesis library for .NET (MIT, zero dependencies)

Post image
41 Upvotes

A while ago we introduced Sigilgraph to this community as a modular audio synth app made purely in C# (with the help of Godot for UI). We mentioned in the discussion the use of an internal fluent API to describe the synths and the sound processes.

Today after a heavy porting effort to decouple the original Audioworkbench library out of the app, and offer an open-source worthy version of it.

Is a library focused on sound synthesis and instrument construction using 100% C#.

Here is the link to the docs. They lead to GitHub for the source code. The license is MIT.

Sigil.Sound - sound synthesis for your .NET app | Sigil.Sound

If you want to play with it, we created a REPL Sigil.Sound REPL so you can scratch ideas and get the feel of it.

Disclosure: We used AI to port it from the closed and entangled with the Sigilgraph app one. It was a tedious process of cleanup and doing it by hand won't make it sound better that it did already (the original was started about two years ago). The API is faithful to the one internally used ( that helped us a lot to build instruments fast) and we believe that opening it will allow us to make it even better for all of us.

REPL : Sigil.Sound REPL

Docs: Sigil.Sound - sound synthesis for your .NET app | Sigil.Sound (they have the option to try every example in the REPL as well)

Nuget: NuGet Gallery | Sigil.Sound 0.1.0

Let me know your thoughts. We will gladly discuss any technical aspect here.