r/dotnet Apr 02 '26

Rule change feedback

14 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 1h ago

Question Migrations squashing

Upvotes

How do you deal with ever expanding migrations and the need to squash them?

Each migration comes with a huge designer file, which ends up being a bottleneck when migration count stacks up: whenever doing a new migration, it takes more time than before / uses more resources because the migrator is scanning all designer files as well as all the migrations.

The solution is “squash the migrations and you’ll be good”. And that works.
But squashing the migrations is a coordinated process, because it means (at least for us) squashing and then updating the migration project on any open branch. Add to this the custom SQL when there is some.

Basically squashing is a bottleneck for us, and I’m wondering if there’s a default process to deal with this in EF. Or how people in other company deal with it


r/dotnet 19h ago

A Self-Baked Async FFI Framework for Rust <-> C# Interop

Thumbnail scylladb.com
39 Upvotes

Getting Rust's tokio and .NET’s async runtime talking to each other via the C ABI


r/dotnet 30m ago

How do you plan your database schema for a new backend? Do you design everything upfront or adapt on the go?

Thumbnail
Upvotes

r/dotnet 3h ago

Windows.Media.SpeechRecognition.SpeechRecognizer dication mode stopped working

Thumbnail
1 Upvotes

r/dotnet 4h ago

Dotnet foundation transparency update

Thumbnail
1 Upvotes

r/dotnet 18h ago

Question Server drops behind a load balancer — how does Blazor Server handle it?

12 Upvotes

I’ve been on ASP.NET Core MVC for a while now, and it’s been solid. But lately, seeing where Microsoft is pushing Blazor, I’m seriously considering it for our front-end websites — not just the back-end admin panels. At work, I’m even planning to recommend it.

The catch is our sites run behind load balancers. Sticky sessions we can set up, no problem. But I’m not sure how SignalR behaves with them. Cookie-based sessions transfer fine — we can re-authenticate users on a new server without much drama. But the SignalR connection and the UI state?
That’s the part I don’t have a clear picture of.

If by a server breaks or gets overloaded and a new instance spins up, what does the user actually see? Does the UI just forget everything — form fields, button states, the works? I suspect it behaves more like a page refresh: the user loses their current state, but sessions and cookies get managed anyway. Still, I’d like to hear from people who’ve actually run this in production.


r/dotnet 9h ago

Question Why localemu AWS Emulator was not popular still has 132 AWS Service?

Thumbnail gallery
3 Upvotes

Hello Everyone, I am Recently Searching for a good Open-Source Complete Free AWS-Emulator for local-development, i find some emulators in internet.

  1. LocalStack : it is only for hobby and not for commercial usage and only have 30 free services.
  2. LocalEmu : It is completely free and Open-Source and have 132 AWS services.
  3. Floci : It is completely free and Open-Source and have 75 AWS services.

What is Surprising to me LocalEmu and Floci both are completely free and Open-Source but Floci have only 75 AWS services but it has 23k github stars but LocalEmu has 132 AWS services but it has only 179 stars in github.

Why LocalEmu is not popular still have lot of services then Floci and it is still completely free?

I search about LocalEmu in youtube i can't even able to find a single video about LocalEmu, when i search about LocalEmu in youtube only LocalStack is coming in front, why youtubes not speaking about this amazing AWS-Emulator?, Is have any issue with this emulator?, because github star is too low so i getting this question?

localemu floci


r/dotnet 2h ago

I built a source-generated RPC library that makes Blazor render modes transparent to your services

Thumbnail
0 Upvotes

r/dotnet 11h ago

C# Project Integrating Hangfire with RavenDB

1 Upvotes

Hi everyone!

I’d like to share with the community a project I’ve been working on in C#.

It’s a project that uses Hangfire for task processing and RavenDB as the database. The package responsible for this integration is outdated and is no longer maintained, so I decided to continue working on it and keep this ecosystem maintained and up to date.

It’s something I started mostly out of curiosity because I thought it would be interesting to work on this integration, and I wanted to share it with you all.

https://github.com/kelvinaxhcar/Job-Hangfire-RavenDB

https://www.nuget.org/packages/Job.Hangfire.Raven6x/1.0.7#readme-body-tab


r/dotnet 13h ago

Unsafe function pointers C#

0 Upvotes

Hi

I wrote some unsafe C# code which is working just fine even though it was hard to figure out :) but i would like the code to be cleaner.

here's my code:

public static unsafe delegate* unmanaged[Cdecl]<byte*, byte*, byte*, int> callback = null;

[UnmanagedCallersOnly(EntryPoint = "RVExtensionRegisterCallback", CallConvs = new[] { typeof(CallConvCdecl) })]

public static unsafe void RVExtensionRegisterCallback(delegate* unmanaged[Cdecl]<byte*, byte*, byte*, int> cb)

{

callback = cb;

}

And this is how i would like to have:

public unsafe delegate* int DelType(byte* a, byte* b, byte* c);

DelType callback = null;

But that does not compile due to the delegate*

I guess its not possible to use DelType with unsafe code or am i missing something?

Any feedback on how to improve is welcome :)

thx!


r/dotnet 13h ago

How’s the job market for C#/.NET developers in Germany right now?

Thumbnail
0 Upvotes

r/dotnet 1d ago

Question Spotify locked hobbyist devs out of their own Web API anyone found a workaround?

6 Upvotes

Built a little desktop overlay app for myself (Windows, C#/WPF) that shows now-playing info from whatever's active Spotify, browser tabs, etc. Wanted to add two small things: a "Like this track" toggle and "add to playlist," both using Spotify's official Web API with proper OAuth (not scraping, not cookies, the real documented flow).

Got the OAuth connection working fine, correct scopes granted (playlist-modify-public/private, user-library-modify, confirmed by decoding the actual token), reading data works perfectly playlists, currently-playing, profile, all fine. But every single WRITE call (add track to playlist, save/like a track) comes back with an identical, unhelpful `403 Forbidden` no error detail, no "insufficient scope" message, nothing. Tested it against three different playlists I own, including ones I created myself. Same result every time.

Dug into it and found out why: new apps are stuck in "Development Mode" (max 5 allowlisted test users), and getting out of that into "Extended Quota Mode" which is apparently required for these write endpoints to actually work now requires being a registered business with 250k+ monthly active users. As of May 2025, individuals can't even submit the request form anymore. So a completely legitimate, personal, non-commercial use of Spotify's own published API is just... not possible now, even in "development" for your own account.

Is this actually as dead-ended as it looks, or is there something I'm missing? Curious if:

- Anyone's found an actual working path for personal-use write scopes post-2025

- Whether Development Mode + allowlisted users is supposed to allow writes at all, or if that was already quietly killed

- Any alternative (even unofficial-but-sanctioned-feeling) way to do this that isn't "become a company with a quarter million users"

Not mad, just genuinely surprised a basic "add to playlist" button is this locked down for a hobby project now. Anyone been through this?


r/dotnet 1d ago

What discrepancies have you encountered when moving from VS builds to VS Build tools-based builds past VS 2019?

1 Upvotes

My a bit outdated experience was that vs build tools was not quite the same as visual studio.

Is it 100% safe now to just replace 18.4 vs with vs build tools 18.4 with the same targetting/build workloads or are there still hickups that you've encountered in the past 5-6 years?

EDIT:

Also, how did you verify that you got the same builds? Binlogs/preprocessed msbuild and compare and/or file-hashes?


r/dotnet 1d ago

Question JIT and RAM usage are often making me think that I'm leaking memory somewhere

4 Upvotes

I have been recently building a proxy application that was meant to do nothing besides shoving TCP stream traffic from A to B with a rate limiter inbetween.

For that I used PipeReaders and Writers to hand the buffer handling over to .NET itself.

However, as the application was running I noticed a small but steady increase in RAM usage as time went on. At some point I was considering to manually invoke GC to test if I was just having lose heap allocations sitting somewhere.

The memory did indeed go down but not as far as I'd like to see. Then I was thinking that this might be just JIT recompiling and optimizing hot paths.

So this brings me to my questions:

- I want to keep the RAM usage as low as possible as this proxy is only supposed to kick rate limited traffic between two endpoints. What are common tricks used to make the runtime collect more aggressively?

- what are reliable techniques to identify actual leaks and how to distinguish them from JIT just performing tiered compilation?

Thanks for your time!


r/dotnet 2d ago

Promotion Why I Built The KillerPDF.Engine

43 Upvotes

Weekend self-promo, so I hope this is fair game.
I maintain KillerPDF, a Windows PDF app, and I recently ripped out PdfSharpCore and wrote my own PDF engine in C# on .NET 10.
It's GPLv3 and on NuGet as a standalone library with no UI dependency.

I wrote this post mostly because the interesting part wasn't the release, it was everything PDF forces you to deal with once you stop treating a page as a self-contained thing: object graph imports, incremental updates that can't touch signed byte ranges, encryption key handling during renumbering, and actual PDF/A and PDF/UA gating instead of just writing the claim into metadata.

I also ran the full save pipeline against 2,907 files from the veraPDF, Isartor, and TWG conformance suites and published the results and the benchmark method, since "it's faster" means nothing without a corpus and a procedure. I'm currently building out a new, much larger, publicly-available corpus to give myself concrete goals and milestones to work toward rather than calling it done.

I'm happy to answer questions about any of it, and if anyone here has fought PDF in .NET I'd like to hear your battle stories.

https://thekiller.net/blog/why-i-built-the-killerpdf-engine

https://killerpdf.net/engine
https://github.com/SteveTheKiller/KillerPDF/tree/main/engine


r/dotnet 1d ago

Question Dotnet roadmap

0 Upvotes

Hi everyone, I recently graduated with an MCA and I'm planning to become a .NET Full Stack Developer. I'm a complete beginner when it comes to .NET, so I'm not really sure where to start or what I should learn first.

For the time being, I can't afford to join an institution or paid course, so I'm planning to self-study using free resources.

Could anyone who is working in .NET or has gone through this journey suggest a proper roadmap from beginner to job-ready?

I'm willing to put in the time and learn everything through self-study. Any advice from people who have already gone through this would be really helpful. Thanks!


r/dotnet 2d ago

Newbie Created a structured repository to practice C# Data Structures & Collections — Feedback welcome!

14 Upvotes

Hi everyone!

I'm an IT student focusing on C# and .NET core fundamentals. To build a strong foundation in backend engineering and memory/performance concepts, I created a hands-on repository covering various C# Data Structures and Collections.

What I've covered so far:

• List<T> & Reference Types

• LinkedList<T>, Stack<T>, and Queue<T>

• Hashtable, Dictionary<K,V>, SortedList, and SortedDictionary

• SortedSet<T> & HashSet<T> (Set operations like UnionWith, IntersectWith, etc.)

Each module includes sample code and a quick breakdown in the READMEs. I'd love to hear your feedback or any suggestions on code style and performance optimizations!

GitHub Repo: https://github.com/24alpserdar/csharp-data-structures-and-collections


r/dotnet 1d ago

Augmented Dotnet Watch Task - Agent Awareness

0 Upvotes

The problem is Claude Code flooding my watch task with file changes. His file modifications are unfortunately precisely timed to trigger 27 rebuilds per minute, overheating my laptop and starting a fire in my parents basement.

My solution was to build a dotnet --watch alternative that is agent aware and only rebuilds once appropriate. It tails the agent output to look for modifications to relevant files and then triggers a reload after Claude finishes his turn. This prevents flooding the watch task with reload signals.

I really just wanted to share the idea because I think making watch tasks that can respond to both human and agent input appropriately is useful. So this is just a basic proof of concept that already works well for me. Feel free to share or use the idea for a more robust solution with partial update etc. Cheers!

https://github.com/crs-sys/claude-blazor-watchtask


r/dotnet 1d ago

.NET Core’s modular architecture and performance for scalable web platforms.

Post image
0 Upvotes

r/dotnet 2d ago

Promotion New library for manipulating firmware: BincopySharp

16 Upvotes

Hola a todos,

Quería compartir una librería que creé hace unos meses: BincopySharp. Permite trabajar con formatos de archivos binarios utilizados en firmware integrado (Motorola S-Record, Intel HEX, TI-TXT, ELF y binario simple) desde C#.

Necesitaba fusionar, recortar y convertir entre estos formatos en un proyecto .NET. Sabiendo que existen otras librerías en .NET para este fin, como HexIO o IntelHexFormatReader, me di cuenta de que ninguna se acerca a la funcionalidad que ofrece la API bincopy (una librería de Python).

Por eso, quería que ese comportamiento exacto estuviera disponible de forma nativa en C#. Mi primer intento en el proyecto fue crear un subproceso de Python y pasar datos a través de archivos temporales. Funcionó, pero no me convenció, así que terminé portando el mismo comportamiento a una biblioteca de C# en mi tiempo libre. No es una migración completa, solo las características que consideré más comunes. El mismo conjunto de pruebas de la biblioteca original de Python también se portó al proyecto de C#.

Este es un nicho de mercado. Por si eres desarrollador de sistemas embebidos (o conoces a alguien) que alguna vez haya necesitado trabajar con archivos de firmware a través de una aplicación .NET, esto es para ti :)

Repositorio: https://github.com/alf-tg/BincopySharp
Nuget: https://www.nuget.org/packages/BincopySharp

Se agradecen comentarios, sugerencias sobre casos de uso faltantes o formatos que debería agregar.


r/dotnet 2d ago

Promotion DNCDbg v1.2.0 — a managed code debugger with DAP support for .NET apps (NetCoreDbg fork)

Thumbnail github.com
6 Upvotes

This probably looks funny — a NetCoreDbg developer (yep, that's me, at least while I'm writing this, hehe) forking NetCoreDbg. But life is a strange thing sometimes.

Over the last ~3 years, me and my PL (huge thanks, Gleb!) prepared and sent a lot of proposals for NetCoreDbg development. Unfortunately, all of them were rejected — it looks like Samsung isn't interested in investing into active NetCoreDbg development, and hasn't been for years now. So upstream gets only support and minor changes (and you've probably noticed that already).

At the beginning of this year I finally decided to fork and implement my vision of how a managed debugger could look like in code — all our TODOs and features we planned for NetCoreDbg, but without the experimental features and without explicit Tizen OS support. I think the current development of DNCDbg has reached a point where it's ready to be showcased. I hope you'll like DNCDbg as much as NetCoreDbg.

Repo: https://github.com/viewizard/dncdbg

Note: in DNCDbg I'm focused on DAP protocol support only, without experimental features like Hot Reload (which requires IDE-side support) or interop (mixed) debug mode. If you need other protocols or those experimental features that I removed from the code, you should probably wait until my PL tells me something like "we have budget, back to NetCoreDbg development" (but that doesn't look like it'll happen any time soon). I've already ported about 20 bugfixes for bugs I found back to NetCoreDbg (you can see most of them in the last release), but looks like that's all I can do for now.


r/dotnet 3d ago

PostgreSQL or SQL Server for my first production .NET app?

111 Upvotes

I’m a .NET developer with decent database experience, and I’m planning to build a private school management system for a client with around 2,000 students.

I’ve worked extensively with SQL Server professionally and on my own projects, and I really like its tooling, especially SSMS. I’m also comfortable with EF Core and ADO.NET.

My hesitation is licensing costs. I’m considering starting with SQL Server Express, but if the application grows significantly, I’m concerned about future licensing costs.

PostgreSQL is obviously attractive from a cost perspective, but I have much less experience with it.

For those running .NET applications in production:

Which would you choose for this project: PostgreSQL or SQL Server, and why?

I’m particularly interested in real-world experience, long-term costs, and maintainability, rather than benchmark comparisons.

A few clarifications:
For a single school, I’m fairly confident SQL Server Express would be more than enough. The 50 GB limit is plenty for this use case. My concern is more about future growth and potentially turning this into a multi-tenant product for multiple schools, where I may eventually outgrow Express.

I’d personally prefer SQL Server, but I’m worried that the licensing costs could become a problem if the product grows. The client currently doesn’t have any SQL Server infrastructure, so I’d be starting from scratch.


r/dotnet 2d ago

Promotion Orchard Harvest 2026 Online Conference

Post image
3 Upvotes

Orchard Core, the open-source .NET CMS and application framework will have its yearly conference online on the 10-11th of September!

Two days of talks and time with the people who build on Orchard Core, meet the maintainers and the wider community.

Find more details on our website (https://orchardcore.net/harvest). Tickets are free but registration is required.
https://www.tickettailor.com/events/lombiqtechnologiesltd/2247098


r/dotnet 3d ago

Question How do you actually master .NET Garbage Collection & memory profiling (PerfView, dotMemory, Span/Memory)?

56 Upvotes

Hey everyone,

I understand standard .NET GC fundamentals (Gen 0/1/2, LOH/POH, allocation vs. collection costs, and server vs. workstation modes), but I want to take my memory profiling and performance engineering skills to a senior/architect level.

Specifically, I want to move past just observing high memory usage and get confident at root-causing subtle issues like pin-induced heap fragmentation, mid-life crises, GC pause spikes, and optimizing high-throughput hot paths.

How do you structure your investigation between tools like PerfView (for ETW / GC event internals) and snapshot profilers like dotMemory / dotnet-dump? What heuristics or specific ETW events (e.g., GC/AllocationTick, GCStart/GCEnd) do you look at first?

What resources helped you understand the CLR GC's actual mechanics under load? What deliberate practice or projects helped you master allocation-free patterns (Span<T>, Memory<T>, ArrayPool<T>, ValueTask, ref structs) without prematurely over-engineering normal business code?

Would love to hear what workflows, books, or real-world debugging war stories made things truly click for you.