r/dotnet • u/Aljosa_Suman_ • 1h ago
r/dotnet • u/MaximRob • 2h ago
Question Migrations squashing
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 • u/Unlikely_Brief5833 • 3h ago
I built a source-generated RPC library that makes Blazor render modes transparent to your services
r/dotnet • u/RedEye-Developers • 10h ago
Question Why localemu AWS Emulator was not popular still has 132 AWS Service?
galleryHello Everyone, I am Recently Searching for a good Open-Source Complete Free AWS-Emulator for local-development, i find some emulators in internet.
- LocalStack : it is only for hobby and not for commercial usage and only have 30 free services.
- LocalEmu : It is completely free and Open-Source and have 132 AWS services.
- 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?
r/dotnet • u/kaxhcar • 12h ago
C# Project Integrating Hangfire with RavenDB
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
Unsafe function pointers C#
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 • u/According_Eye_2841 • 14h ago
How’s the job market for C#/.NET developers in Germany right now?
r/dotnet • u/KausHere • 19h ago
Question Server drops behind a load balancer — how does Blazor Server handle it?
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 • u/swdevtest • 20h ago
A Self-Baked Async FFI Framework for Rust <-> C# Interop
scylladb.comGetting Rust's tokio and .NET’s async runtime talking to each other via the C ABI
r/dotnet • u/tinmanjk • 1d ago
What discrepancies have you encountered when moving from VS builds to VS Build tools-based builds past VS 2019?
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 • u/Alert-End-7839 • 1d ago
Question Dotnet roadmap
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 • u/sudo88mph • 1d ago
Question Spotify locked hobbyist devs out of their own Web API anyone found a workaround?
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 • u/tech_sgr • 1d ago
.NET Core’s modular architecture and performance for scalable web platforms.
r/dotnet • u/Ashamed_Narwhal_5348 • 1d ago
Augmented Dotnet Watch Task - Agent Awareness
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!
r/dotnet • u/Own_Nail_2999 • 1d ago
Question JIT and RAM usage are often making me think that I'm leaking memory somewhere
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 • u/smilaise • 2d ago
Promotion Why I Built The KillerPDF.Engine
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 • u/fuzhongkai • 2d ago
Promotion TensorSharp now supports local AI video generation with MiniMax H3
Enable HLS to view with audio, or disable this notification
I’ve been working on adding video generation support to TensorSharp, my open-source AI inference engine written in C#/.NET.
The latest integration adds support for MiniMax H3, so TensorSharp can now go beyond LLM and image inference and run AI video generation as well.
The demo attached to this post is an image-to-video example: I attach an image, describe the motion I want, and TensorSharp runs the H3 generation pipeline locally.
A big part of the work was bringing a diffusion/video-style inference pipeline into a .NET-native engine that was originally focused much more heavily on LLM inference.
There are still plenty of optimizations to work on, especially memory usage and generation speed, but the basic pipeline is working.
I’d be particularly interested in feedback from .NET developers on the API/design side. AI inference in C# is still a much smaller ecosystem than Python, and I’d like to make this kind of workload easier to integrate into normal .NET applications.
TensorSharp is open source:
https://github.com/zhongkaifu/TensorSharp
r/dotnet • u/Human_Tackle_4946 • 2d ago
I built a real-time chat app using .NET MAUI & ASP.NET Core.
Hey everyone, 👋
I wanted to share a solo project I’ve been working on called Chatfri, a free, real-time chat and discovery app. The Android version recently went live on Google Play, and the iOS version is currently live on Appstore.
Since I built the entire stack from scratch, I wanted to share my tech stack, some architectural decisions, and a few headaches I encountered along the way. I’d love to get your feedback!
🛠 The Tech Stack
Frontend (Mobile): .NET MAUI (C#) for both iOS and Android.
Backend: ASP.NET Core Web API, hosted on a Debian 13 server using Nginx.
Database/Cache: Redis for handling real-time active user states and fast data retrieval, plus SQLite for local device caching (LocalDBService).
Messaging: CommunityToolkit.Mvvm (WeakReferenceMessenger) for component communication.
🚀 Technical Highlights & What I Learned
1. Insane Backend Performance with Redis
One of the things I'm most proud of is the backend optimization. Currently, a single user actively messaging and navigating hits the server with about 3-5 requests per second (short polling). Despite this aggressive rate, the server CPU usage sits at around 0.3% per core per user. Redis is absolutely flying, and I highly recommend it if you are building anything real-time.
2. Smart Background Polling (Single Loop)
Initially, I had multiple while loops running in the background for fetching messages and friend requests, which was heavy on the device. I refactored it into a single centralized polling loop.
When a user opens a specific chat room (MessageDetailViewModel), I send a "Pause" signal via WeakReferenceMessenger to pause the global friend-request sync. The millisecond the user leaves the page (handled via the OnDisappearing override), it sends a "Resume" signal. This eliminated overlapping background tasks and prevented memory leaks.
3. Planning for the Future: Hybrid SignalR Architecture
Right now, the app uses HTTP polling. It handles the current load perfectly, but I know it's not sustainable for 10k+ concurrent users due to bandwidth and socket exhaustion.
My plan is to implement a Hybrid Architecture: I will keep using standard HTTP GET/POST for heavy lifting (like loading the home screen with 25+ user profile pictures) and introduce SignalR purely for lightweight text message delivery inside the chat rooms. (Sending 25 Base64 images over a WebSocket is a recipe for disaster).
4. The AdMob Headache
Like many indie devs, I got hit with the classic 30-day AdMob suspension for "Invalid Traffic." My ad placements are completely safe (no accidental clicks near buttons), but a small ad campaign on TikTok brought in a wave of fast-bouncing traffic that tripped Google's AI. Currently waiting it out and focusing on organic growth!
🤝 Looking for Feedback
I’m really looking forward to hearing your thoughts.
Has anyone else implemented a similar HTTP/SignalR hybrid approach in MAUI?
Any tips for surviving the initial AdMob "Invalid Traffic" phase for new apps?
General UI/UX feedback is always welcome!
App is here: [chatfri](https://chatfri.com/qr) (You can find the app store links here)
Thanks for reading! Let me know what you think.
r/dotnet • u/viewizard • 2d ago
Promotion DNCDbg v1.2.0 — a managed code debugger with DAP support for .NET apps (NetCoreDbg fork)
github.comThis 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 • u/mightyAS1907 • 2d ago
Newbie Created a structured repository to practice C# Data Structures & Collections — Feedback welcome!
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 • u/krisztaszbo • 2d ago
Promotion Orchard Harvest 2026 Online Conference
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 • u/New-Entertainer6392 • 2d ago
I'm still using dapper in production. Change my mind.
Why should I move to EF?
Promotion New library for manipulating firmware: BincopySharp
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.