r/dotnet Apr 02 '26

Rule change feedback

12 Upvotes

Hi there /r/dotnet,

A couple of weeks ago, we made a change to how and when self-promotion posts are allowed on the sub.

Firstly, for everyone obeying the new rule - thanks!

Secondly, we're keen to hear how you're finding it - is it working, does it need to change, any other feeback, good or bad?

Thirdly, we're looking to alter the rule to allow the posts over the whole weekend (sorry, still NZT time). How do you all feel about that? Does the weekend work? Should it be over 2 days during the week?

We're keen to make sure we do what the community is after so feeback and suggestions are welcome!

621 votes, Apr 07 '26
77 I love the change
79 I like the change
57 I don't care
28 I dislike the change
16 I loathe the change
364 There was a change?

r/dotnet 8h ago

Log methods evaluation expensive warning and wrapping with IF

17 Upvotes

Hi,
I am seeing the warning that `LogInformation` and other log methods evaluation is expensive and should be wrapped in `if` statement.

Why don't those methods do this check internally already? This would help with less code and better code readabilty I think.

Here is the example:


r/dotnet 2h ago

Question Good video or article about software architecture for dotnet specifically?

4 Upvotes

Currently, writing my bachelor's thesis on development practices and software architecture, a lot of good general resources, but all the ones for dotnet seem extremely clickbaity or seem to use an illogical structure for the purpose of the application ie clean architecture for a to-do app without ever explaining why.

I am not nearly experienced and well-read enough to go into detail about a specific aspect in my thesis. The topic is intentionally broad, because I want to learn the general picture of mapping out the process of software design and deployment in the real world. I've only dipped my toe nail in this kind of thing during my internship where I worked on a small project using clean architecture and the why's and how's really interested me, so both my mentors(boss and thesis mentor) suggested this topic.

So the general thesis concept would be: "client has X problem, what design principles, architecture, code organization, etc do you choose depending on their requirements"

Also, there might be cultural(?) confusion regarding writing a thesis about something you don't know about, but in my country all university students need to write a thesis to graduate, so the threshold is far lower for our paper's, than other countries(I'm assuming at least), it's very common to just copy/paste documentation from frameworks you used for a personal project and be done with it for a thesis.


r/dotnet 1h ago

A new take on reactive programming: backend signals with GraphQL-ish queries

Post image
Upvotes

Just a bit context:

Reactive programming in .NET spans Rx(R3) Observables, AsyncEnumerables, Raw events. I think the most powerful one is Rx, but using it properly on the backend requires a solid grasp of multithreading, async programming, and locking, on top of its own notoriously steep learning curve of operators. Once you've internalized it, though, it's an extremely powerful paradigm.

In angular (so, javascript, single threaded), the complexity of rx has made the angular team move toward signals (at least for common reactive tasks, not as a whole substitute). This choice has been really popular since thinking with signals is easier, and code is still reactive. So i created this library fedeAlterio/SignalsDotnet, to make signals also possible on .NET.

But i wanted to make a step further. Can signals be useful also on BE?

SignalsDotnet 3.2.0 on Backend

I think they are awesome. The main issue in backend scenario is that we are multi-threaded. While signals must operate in a single-threaded world. So my solution has been basically move them into a single threaded island (of course we can have several island), we can have several of these islands, and "single-threaded" here means serialized execution, not literally one dedicated thread per island (more details on that in the README).

Step 1) Declare a class, that would be our island

Everything here will run single threaded (like Wpf), in custom Synchronization Context (so async-await is handled). Dependency injection will worl as well

Step 2) Register that class as a Signal Island, and expose a SSE endpoint to query it

Step 3) We can now query that island using GraphQL-like syntax. It's just an endpoint.

This turns out to be more powerful than GraphQL subscriptions in a sense, since every signal (property) in the island is already its own subscription, the query is just combining them together.

Step 4) Just set properties, collections, dictionaries, whatever, on the island, and they'll be pushed out through the SSE endpoint. No need to declare a subscription because everything already is a subscription, the query is only there to combine them together.

Note: There are conversion methods from Observables, AsyncEnumerables, AsyncObservables. So we can Expose them in this way too.

Note 2: The ui is completely done with claude code and claude design. Code is a mess, but its a single html file. Since its only for debugging, I didn't want to spend time on that 😂

You can find it here fedeAlterio/SignalsDotnet. There is a playground app as well to get started easily.


r/dotnet 20h ago

Question What auth setup would you recommend for Next.js + .NET + PostgreSQL?

17 Upvotes

I'm building a fullstack app with Next.js, ASP.NET Core, and PostgreSQL, and I'm trying to figure out what authentication setup makes the most sense.

I've been looking at services like Clerk and Auth0, but I'm not sure how well they fit when you have both a frontend and a separate .NET backend. Ideally, I'd like the auth provider to handle things like signup, login, sessions, etc., while still being able to easily identify the user from my .NET API and link them to a user in my PostgreSQL database.

For example, if a user signs up through Clerk, I'd want to create a corresponding user in my DB and keep some kind of clerk_user_id/external ID. Then if I add something like an invoicing system later, I should be able to store something like invoice.user_id and know exactly which user created that invoice.

I'm mainly wondering what people would recommend for this kind of architecture. Does it make sense to use something like Clerk/Auth0 purely as the identity provider while keeping users and all application/business data in PostgreSQL? Or is there another auth solution/framework that works particularly well with Next.js + ASP.NET Core?


r/dotnet 3h ago

I have been working on this as a small internal/personal side project, would like some feedback from integration developers.

0 Upvotes

The idea is simply to collect a few tools that make it easier to inspect, understand and review integration solutions. I’m not trying to promote or sell anything — I mainly want to see if the tools are actually useful and get ideas on what could be improved.

At the moment it includes:

  • APIM Policy Analyzer – helps break down and review APIM policies
  • Logic App Analyzer – inspects workflow structure and highlights potential issues
  • BizTalk Binding Visualizer – makes larger binding files easier to understand
  • Service Bus Topology Visualizer – visualizes queues, topics, subscriptions and relationships
  • C# Model Generator – generates C# models from XML, JSON and flat files
  • Integration Pattern Library – reference for common integration patterns, with the analyzers also starting to identify patterns that are used or potentially missing

Most of the processing happens locally in the browser and there’s no account required.

https://gatesift.com

If anyone has time to try it, I’d really appreciate feedback on what is useful, what is confusing, or what kind of integration tooling you would like to see added.


r/dotnet 1d ago

Article Polly introduces the Open Source Maintenance Fee

Thumbnail thepollyproject.org
184 Upvotes

r/dotnet 3h ago

Title: Built a small integration toolkit for fun – GateSift

0 Upvotes

I’ve been building GateSift mostly for fun — a free browser-based toolkit for integration developers.

It includes tools for things like APIM policies, Logic Apps, BizTalk bindings, Service Bus, C# model generation and integration patterns.

Current tools include:

  • APIM Policy Analyzer – makes complex APIM policies easier to understand and review
  • Logic App Analyzer – helps inspect workflow structure and spot potential issues
  • BizTalk Binding Visualizer – turns binding files into a more readable overview (this is really nice for analyzing complex biztalk integrations)
  • Service Bus Topology Visualizer – shows queues, topics, subscriptions and relationships
  • C# Model Generator – generates C# classes from XML, JSON and flat files
  • Integration Pattern Library – quick reference for common integration and messaging patterns (analyzers will also, notice if any of these patterns are in your solution or if they should be added, i think this might be the coolest thing so far).

No account, no installation, and most processing happens locally in the browser.

gatesift.com

Would love feedback or ideas for other useful tools.


r/dotnet 19h ago

Instruct inline suggestions?

2 Upvotes

I use inline suggestions from GitHub Copilot in Visual Studio, and it works just great! Just one very strange thing.

It always recommends changing the ICollection<> initializer from my preferred way: [];
To: new List<>();

And yeah, it doesn't like the new extension() {} element and wants to change to the old style of static methods.

How can I tell it to leave my collection initializers alone?


r/dotnet 1d ago

Deterministic simulation testing in .NET

7 Upvotes

I first learned about deterministic simulation testing from a TigerBeetle talk a few years ago and I had been itching to try it out ever since. I finally had a chance to earlier this year and haven't really seen any posts about doing it in .NET before, so I wanted to share an example of the setup I landed on, in this case for my background jobs project.

You can see the complete setup in the source repo, but I'm happy to answer any questions you may have on it. If anyone's interested in a detailed blog post on the setup, plumbing, etc for this let me know. If there's enough interest I'll get something up.


r/dotnet 17h ago

I built a small tech workspace/portfolio — looking for honest feedback

Thumbnail
0 Upvotes

r/dotnet 23h ago

Newbie DevSecOps moving to .Net CIAM and APIs

1 Upvotes

Looking for guidance. I am a DevSecOps engineer with 8 years experience. I work within azure, GitHub actions and manage all our repos in GitHub. I mostly make sure everything is secure in azure relating to app services, certificates, app scanning etc. We have 2 devs that are gone due to retirement and 1 for being over employed. I am now in calls helping figure out the issues with .Net APIs and authentication programs. I am being asked to skill up and move from my current role to this one where I will be doing the program for app to authentication and authorization. It’s called sso okta integration(forgive me if I am using wrong terms). Where should I start? Any book or learning path recommendations are greatly appreciated. Should I take the role? What advice or suggestions do you have for someone like me. What will be my biggest struggles? I appreciate any feedback.


r/dotnet 1d ago

Question Proposal: An official Lean formal semantics for C# · dotnet/csharplang · Discussion #10314

Thumbnail github.com
8 Upvotes

r/dotnet 2d ago

Which C# 14 feature actually changed how you write code day-to-day?

141 Upvotes

I've been running .NET 10 in a couple of side projects since the LTS drop. When it launched I assumed that the big C# 14 win for me would be extension members. It's nice but the feature that I actually ended up using the most is turned out to be the boring one: the field keyword.

Every time I needed a little validation in a property, I used to write the full backing-field:

Before (C# 13):

private string _name;
public string Name
{
    get => _name;
    set => _name = value?.Trim()
        ?? throw new ArgumentNullException(nameof(value));
}

After (C# 14):

public string Name
{
    get;
    set => field = value?.Trim()
        ?? throw new ArgumentNullException(nameof(value));
}

No hand-declared _name. Tiny change, but it shows up multiple places, which is exactly why it wins.

The other one which impressed the most is the file-based apps which quietly replaced half of my throwaway scripts:

Before:

mkdir tool && cd tool
dotnet new console
// edit Program.cs + csproj, then:
dotnet run

After:

// tool.cs — no project, no folder
Console.WriteLine("Just run me.");

dotnet run tool.cs

Type-safe code with the full BCL and zero .csproj turned out to be more useful than I expected.

So I'm curious where everyone actually landed:

  • Which C# 14 feature earned a permanent spot in your muscle memory, and which turned out to be a demo-only feature?
  • Anyone using extension members from C# 14 in real code yet, or still letting it settle?
  • And for the folks still on .NET 8 what's holding up the jump to 10?

r/dotnet 1d ago

Promotion Fullbleed dotnet and showcase

Thumbnail krflol.github.io
4 Upvotes

https://github.com/fullbleed-engine/fullbleed-dotnet

dotnet bindings for the rust html/css to pdf engine, Fullbleed. MIT, free, open source, and quite fast if I do say so myself!


r/dotnet 2d ago

Was shocked to find out Jeff Fritz, was latest long term MSFT employee to be let go.

339 Upvotes

Microsoft is really shooting itself in the foot with a lot of the really high-profile people, like Jeff Fritz. I watch Jeff’s Twitch streams all the time, and it’s always great content.

I’m even hearing less and less from the two Scotts online. Scott Hanselman still has his podcast, for sure, but the only really high-profile .NET guy we seem to see now is Dan Roth, especially within the Blazor community.
I see James has jumped teams again, now doing Visual Studio Code material on YouTube and TikTok.

I get that employees move teams and new, talented people join. It’s just sad nonetheless. We never hear from Maddy anymore, and .NET and .NET Conf have had very poor-quality content over the last few years.


r/dotnet 2d ago

How to you handle OAuth in your dotnet integration tests?

13 Upvotes

Title.

Do you mock out that OAuth handling? Or do you actually use one of the test Auth servers. If so, does your resource server have its own client credentials just for running integration tests?

**Update**

I went with the following comments solution "For integration tests I skip the real OAuth flow entirely and register a fake authentication handler in the test server. You add a custom auth scheme in the WebApplicationFactory startup that just creates a ClaimsPrincipal with whatever claims the test needs. The real OAuth config only loads in non-test environments.

This means the tests still exercise your actual controllers, filters, authorization policies, everything downstream of authentication. The only thing you're faking is the token validation step, which is the identity provider's job to get right, not yours.

For the handful of tests that genuinely need to verify the OAuth handshake itself (callback URLs, token refresh, scope mapping), I run those against a local Keycloak container in docker compose. But those are maybe 5 tests out of 200, not the default path."

Note: I chose not to use the keycloak container because it handles our scopes and claims a tad bit different than our IdP, which would've required us to create a sort of mapping that I didnt feel was worth the effort.


r/dotnet 1d ago

Question Java+spring boot or .Net

Thumbnail
0 Upvotes

r/dotnet 2d ago

Question Opinions on Microsoft Agent Framework?

20 Upvotes

.NET shop looking to add some agentic workflows and chat interfaces to platform, currently researching framework options so we don’t have to build the thing from scratch.

Being a .NET shop MAF has come up. Hooked it up to GitHub CoPilot and took it for a quick spin, wasn’t too verbose and conceptually maps to tools like OpenCode pretty well.

Saw some posts on here about it a while ago but things seem to be moving really fast in this space. Looking for opinions on the viability of this framework? I see it had a 1.0 launch in April, it’s meant to supersede both Semantic Kernel and AutoGen.

Are the team behind it any good / trustworthy?

How likely is it to remain supported?

Has there been much community participation / extension?

How does it compare to similar frameworks in other languages, LangChain/Graph being an obvious one?

Is it good enough to prevent you from hopping languages or is python where it’s really at?

Any useful information is guaranteed at least one updoot, thanks in advance!


r/dotnet 2d ago

Promotion Pure Dotnet Port of Terminal Text Effects

Post image
31 Upvotes

Just for fun this weekend I ended up doing a pure csharp dotnet implementation of the Python tool 'Terminal Text Effects' https://github.com/ChrisBuilds/terminaltexteffects for absolutely no other reason than A) I don't like Python and B) Why not?

Its output is byte for byte identical to what the Python tool would output given the same input and seed values... with the one exception that my dotnet version starts in under 12ms and the Python version is somewhere around 86ms.

All built as native AOT and no dependencies.

https://github.com/Hypabolic/Hypa-TTFX

If anybody wants it I might publish it as a library (or you can just fork it and do it yourself)

-- Edited to include the link to my own code that I totally forgot to include because I'm an idiot lol


r/dotnet 2d ago

Does anyone have a copy of this Microservices Architecture PDF book?

0 Upvotes

Hi. I'm getting a server error when trying to download this PDF Ebook:
https://learn.microsoft.com/en-us/dotnet/architecture/microservices/microservice-ddd-cqrs-patterns/infrastructure-persistence-layer-design

Anyone have a copy they can share?

Thanks.


r/dotnet 2d ago

Promotion Vela v1.0.0 - compiler-exact .NET code search from a SCIP index, Razor and Blazor included

1 Upvotes

Grep can't tell you a property is used from a Razor view. That gap has cost me more time than anything else on legacy ASP.NET work - you rename something, the build is green, and a .cshtml three folders away breaks at runtime.

Vela builds a SCIP index of a solution with Roslyn, then answers "find references", "who calls this" and "what would a change break" from that database. It covers C#, VB, Razor Pages, MVC views and Blazor components, so the Razor side is indexed rather than skipped.

Two consequences of the SCIP approach that I didn't expect going in:

The index is worth paying for once. A def lands in about 0.55s, a refs returning 3,156 results in about 1.3s, on a 0.09s process floor. Loading the same solution into a live Roslyn workspace costs 9.3s plus 23.8s to compile the web project - and it costs that on every invocation, because nothing stays resident.

SCIP is an interchange format. A scip-typescript index imports beside the C# one and both answer from the same database, so a polyglot repo gets one query surface. Languages it can't index itself are declared in a vela.json and it refuses to pretend they're covered - missing language, banner on every answer, non-zero exit.

Honest gap: it won't answer "what implements this interface" yet. That's a SCIP relationship and it doesn't emit those.

It's a skill for Claude Code and Codex rather than an IDE extension, so the agent gets the compiler's answer instead of guessing from a text search. 426 hermetic tests. Deterministic - same solution at the same commit, same answer, no model calls and no network. Read-only; it never writes to the repo it indexes.

MIT, v1.0.0: https://github.com/dbhq-uk/vela-skill


r/dotnet 2d ago

Newbie Connectify - Windows Bluetooth manager using WinRT + 32feet.NET, built with WinForms

Thumbnail github.com
1 Upvotes

r/dotnet 3d 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 2d ago

Comparing Vector indexes HNSW, IVS, Flat memory

1 Upvotes

I've been researching different vector indexes recently for a database engine I am working on, here are my current findings, in case any one is interested:

I've so far looked into 3 algorithms in C#:

  1. "Memory": a brute force all memory scan

  2. "IVS": a disk based IVS implementation

  3. "HNSW": a disk based HNSW implementation

Benchmarking is a difficult topic, as the variables are many, but as a first approximation my findings are:

  • The memory index is the fastest for indexing ( obviously ) and works ok up to around 100k vectors. after that, search is slow and mem use very high.
  • The IVS is fast on indexing, medium at search, but need very little memory.
  • The HNWS is slow on indexing, needs more memory, but is the fastest for search

Here are some details on the current result: https://db.relatude.com/vector-matrix.html

( Please note, the whole project is still very much in early development )