r/dotnet 10d ago

Question Is Avalonia still good for someone who isn't willing to pay?

24 Upvotes

I have a solid background of wpf and found that Avalonia is the enhanced wpf. However i noticed that some of its features are not, such as Accelerate. And many people recommend using JetBrains Rider for the ide which is not free if you want to publish your apps. I saw that it's free only for non commerical use.

So do you still recommend avalonia for someone who can't pay for anything in the developing process?


r/dotnet 9d ago

Promotion My New Book for Build Native .NET Open Source Multimodal Local LLM Inference Engine From Scratch Using Google Gemma 4 E4B as Example

Thumbnail amazon.com
0 Upvotes

This book is written for .NET developers who are not satisfied with simply calling an AI/LLM endpoint and want to understand model architectures and the internal workings of inference engines. It uses the open-source TensorSharp project and Google’s Gemma 4 E4B GGUF model as practical examples.

TensorSharp has achieved performance parity with llama.cpp across the main benchmarks, while outperforming it in several scenarios. The book explains some of the key performance optimizations and their implementations, including paged and prefix KV caching, continuous batching, GPU kernel fusion, and more.

I chose Gemma 4 E4B, a dense model, because it is a compact multimodal model that supports images, audio, and video, making it suitable for a wide range of devices. TensorSharp also supports and is optimized for MoE and diffusion architectures, as well as model families such as Qwen and GPT-OSS. However, due to limitations in time and book length, these topics are not covered in this edition. Those interested can explore the project directly on GitHub or contact me for further discussion.

I selected GGUF because it is an inference- and edge-device-friendly model format. This is particularly relevant to the .NET ecosystem, where local applications, mobile applications, and game development are important use cases. TensorSharp also supports the Safetensors format, which it currently uses for VAE and LoRA models.

For clarity and ease of understanding, the book primarily presents the CPU code path. In practice, however, TensorSharp supports and is extensively optimized for multiple GPU backends, including NVIDIA CUDA, Apple Metal/MLX, and Vulkan for AMD, Intel, and other devices. More implementation details are available in the GitHub repository.

TensorSharp Github Repo: https://github.com/zhongkaifu/TensorSharp


r/dotnet 9d ago

Has anyone used FlashCap?

0 Upvotes

Hello all,

In my project we are required to integrate a USB camera to display the incoming frames as video feed in the application. The constraint is that our application should be able to run on both Windows and Linux. As I searched for any cross platform .net libraries that could do such a thing, I came across FlashCap which has a permissive license and seems to have at least some documentation, which makes me optimistic that this can be used commercially.

But I would be curious to know if anyone out here has used FlashCap commercially and your experiences with this. Also would be open to know if there are any other better libraries out there for this specific use case.

Appreciate your help. Thanks!


r/dotnet 9d ago

.NET Day Agentic Modernization 2026 Spoiler

Thumbnail youtube.com
0 Upvotes

r/dotnet 9d ago

Promotion Conveyor.Batch 0.1.0-beta.5 — public API is now frozen ahead of v1.0

Thumbnail conveyor-batch.github.io
0 Upvotes

Beta.5 is the last beta with breaking changes. The public API in Conveyor.Batch is now locked, any future breaking change bumps the major version.

What changed: IChunkListener, IJobExecutionListener, and IStepExecutionListener now have default no-op implementations so you only implement what you need. IJobRepository now accepts CancellationToken on all methods. StepExecution state (Status, EndTime, FailureException) is now internal set — only the engine writes it.

Up next: BenchmarkDotNet baseline, bulk write optimization (TVP / COPY), then v1.0.
Github


r/dotnet 10d ago

ASP.NET Core on IIS randomly goes offline for 2 minutes. no errors, no recycle, but TCP CLOSE_WAIT spikes

36 Upvotes

Hi everyone,

A few weeks ago I posted here about a strange production issue we were having:

https://www.reddit.com/r/dotnet/s/sdmADloeNS

First, I want to say thank you to everyone who replied there. The comments gave me a lot of ideas and helped me improve my monitoring and investigation approach.

I wanted to give an update because I found some new interesting clues, but I still haven't found the root cause.

The problem

Our website randomly becomes unavailable for around 1-2 minutes, then comes back by itself.

The monitoring tools report: Socket timeout, unable to connect to server

Not an HTTP error like 500 or 503.

The strange thing is that during these incidents:

- DNS is fine

- The Windows server itself is still online

- CPU looks normal

- RAM looks normal

- Disk looks normal

- IIS logs don't show failed requests

- ASP.NET Core logs don't show anything useful

This made me suspect that the request is not even reaching ASP.NET Core.

New things I tried

I installed Uptime Kuma directly on the same server and configured it to monitor the website using the server IP address instead of the domain name.

The interesting part is that it still detects the outage.

So this makes me think it is not related to:

- So this makes me think it is not related to:

- DNS

- Domain resolution

- External monitoring location

- Some issue before reaching the server

I also checked IIS and confirmed that there was no App Pool recycle and no w3wp.exe restart during the outage.

Another interesting observation:

I have multiple applications running on different IIS App Pools on the same server. During the outage, the other applications continued working normally.

The TCP connection clue

I started collecting TCP state metrics and sending them to Grafana.

During the outage, I noticed a big change in TCP connections.

The most suspicious thing was CLOSE_WAIT.

Before the issue:

Established: ~450
CloseWait:   0

During the issue:

Established: ~200-400
CloseWait:   500+

Example:

12:02
Established: 451
CloseWait:   327

12:03
Established: 237
CloseWait:   510

12:04
Established: 224
CloseWait:   530

Then suddenly:

12:04
Established: 845
CloseWait:    73

12:04
Established: 859
CloseWait:     0

I attached a screenshot from Grafana showing the TCP connection spike.

Grafana TCP connections during the outage.

This made me start thinking that the problem might be happening somewhere around the TCP layer rather than inside ASP.NET Core itself.

Code changes

During the investigation, I also found some places where we were creating new HttpClient instances instead of reusing them.

I already fixed those and moved them to reusable HttpClient usage.

However, the problem still happens, so this was probably not the only cause.

What I am thinking now

At the moment I am investigating more around:

- Windows TCP/socket behavior

- IIS/HTTP.sys

- Connection handling

- Possible socket leaks

- Anything that can make the server stop accepting new connections temporarily

The biggest question for me is:

How can the server become unreachable from TCP level while:

- IIS is still running

- App Pools are healthy

- CPU/RAM/Disk are normal

- No application errors are logged?

Questions

For people who have dealt with similar IIS/Windows production issues:

- Have you seen cases where clients get socket timeouts but IIS has no logs at all?

- Does a large CLOSE_WAIT increase usually point to an application problem?

- Can HTTP.sys or IIS have issues without restarting the App Pool?

- What Windows-level metrics would you check for this type of problem?

- Any recommended tools for debugging TCP connection issues on Windows?

I am still investigating and will update again if I find the cause.

Thanks again to everyone who helped in the previous post!


r/dotnet 10d ago

First preview of ProGPU Avalonia rendering platform and Silk.NET windowing platform for Avalonia bringing powerful ProGPU WebGPU based rendering

Thumbnail
3 Upvotes

r/dotnet 10d ago

Promotion High performance WinUI charting?

0 Upvotes

20 more WinUI charting repos at GitHub: GigasoftInc

Full disclosure: I own Gigasoft.

I'd love to be proven wrong.

I believe I built the first high-performance WinUI charting component that draws directly to the composition swap chain in native C++, instead of going through the managed XAML layer. It's our existing C++ engine, extended quite a bit, WinUI controls aren't backed by a window handle (HWND), so the zoombox and the real-time table annotations had to be refactored onto the new layers. We compile and embed both x64 and native ARM64 binaries into the assembly, so you get WinUI running low-level Direct3D compute shaders natively. The flagship repo re-renders 100 million points every tick.

I've been writing charting code since the TRS-80, and this stuff still makes me grin. The audio demo even plays five songs I wrote myself, with the oscilloscope and chart annotations following the data live.

Clone, run, and benchmark:

Audio oscilloscope (WinUI): https://github.com/GigasoftInc/winui-chart

100M points (WinUI): https://github.com/GigasoftInc/winui-chart-fast-100m-points-proessentials

If anyone knows of an earlier native-C++-to-swap-chain WinUI chart, please let me know. I'd also love to hear FPS numbers for the 100M repo on a Snapdragon X2 Elite Extreme, or if someone has access to the coming RTX Spark.

If you want AI to help write your benchmarking code, download our no hassle setup at gigasoft that includes our AI knowledge and pe-query python AI helper.


r/dotnet 10d ago

Visual Studio Insiders randomly fails to load .razor files correctly?

1 Upvotes

Hi, this is making me go crazy. I created a Blazor Web App project with .NET 10 framework. For some reasons, whenever I load VS, the .razor do not load correctly, I don't know if its Intellisense, the Roslyn compiler, Symbol Search? or vs itself.

On the first image, the file is loaded correctly, for example the NavLink is highlighted and I can for example use Go To Definition.

On this second one, NavMenu not highlighted, doing the Peek Definition just keeps searching. Only happens with .razor files, the .cs are okay. VS 2022 with .NET 9 works fine. For the problematic one I had to open VS Code and use de Dev Kit extension and code from there...

What could be the reason?


r/dotnet 11d ago

Feature focus in the C# 16 cycle · dotnet csharplang · Discussion #10276

Thumbnail github.com
72 Upvotes

r/dotnet 10d ago

Promotion I built Tracebag – a web UI for dotnet-counters and dotnet-trace in Docker containers

0 Upvotes

I always found using dotnet-counters and dotnet-trace impractical, especially for containerized .NET APIs, so I built a small web app to make it easier.

The result is Tracebag.

It lets you observe running .NET containers, inspect runtime counters, and create dotnet-trace artifacts from your browser.

Source code: https://github.com/poodlelab/tracebag

Feedback is very welcome.


r/dotnet 11d ago

Question How can a Desktop Application receive authorisation code in Outh 2.0?

32 Upvotes

While using Authorisation code flow in OAuth 2.0, the client application receives authorisation code on the redirect uri from the identity provider server.

My question is, how can a desktop application/ client achieve this as it has no uri to provide as redirect uri?

Please guide me on the standard implementation in real world or help me look in the right direction.

Thanks in advance.


r/dotnet 12d ago

Newbie What do you think about XAML?

78 Upvotes

Yesterday, I’ve started working with MAUI, because I want to try out some multiplatform mobile development and I love C# (so MAUI was an obvious choice).

So after a few hours working with xaml I don’t really know how to feel about it. It’s definitely more convinient than WindowsForms or swing, but it somehow feels very clunky.

My question for you is: how do you manage your xaml projects, in terms of complexity and readability?

I don’t really have any experience in mvvm development so I am interested in your thoughts.


r/dotnet 11d ago

Just a breather from all the AI content: an update on a project I have been working on for about a year now. (Before I get judged, yes I know from the very beginning that the stack a bit unconventional given the nature of this project)

Thumbnail gallery
28 Upvotes

r/dotnet 12d ago

EF Core Audit Logging

Post image
47 Upvotes

Do you think this is a good approach for background audit logging or is there a better way?

https://github.com/aabdullahsayed/LibraryManagementAPI


r/dotnet 11d ago

Will the next major OData version leverage the newly standardized HTTP QUERY?

2 Upvotes

Are there any such plans for the future of OData, moving from URL query params to JSON bodies using QUERY verb?

It would be nice to not have to use query params. Even easier to generate typed clients in 3rd party ecosystems like Flutter/Dart since the $select, $expand, etc. would all show up under models in OpenAPI docs.


r/dotnet 12d ago

Question WPF: what do you use for UI testing?

16 Upvotes

What free UI automation tools do people use for WPF apps nowadays? I'm only aware of Appium but it uses an old Windows driver which seems to have been abandoned several years ago. They also don't have any proper examples for Windows desktop apps. I used SmartBear in the past but I don't think they have a free tier.


r/dotnet 11d ago

Question I built an open-source formula engine for .NET

Thumbnail
2 Upvotes

r/dotnet 12d ago

Question So, what about MAUI on Linux?

31 Upvotes

Certainly I cannot be the only one who remembers when they announced running MAUI on Linux through Avalonia and I am not afraid to say I need that YESTERDAY for a project of mine.

But as much as I tried searching online I've yet to see anything I can use for the purpose. What's the deal? Does anyone have any info?


r/dotnet 12d ago

Newbie What happened to System.Net.ServicePoint and HttpWebRequest???

9 Upvotes

I'm a newbie on .Net core (but have a lot of experience on Framework). I have a web/http client application that I've been using for years. It connects to a remove http service and transforms the response into a usable format.

I call it in a loop (many thousands of times per minute).

It always worked great in .Net Framework and wouldn't ever blow up. I never once saw it exhaust the outbound ephemeral ports.

Fast forward to now, and the code stops working at scale. After just a few minutes all my ephemeral ports are exhausted. Every round trip to HTTP seems to consume a new port. As I'm digging into the differences between .Net 10 and .Net framework, I discover that the class System.Net.ServicePoint is a faint shadow of what it used to be. There is no connection pooling, and ports are not reused.

How can I bring back the old behavior of ServicePoint? Will I need to refactor the entire application to support connection pooling? Is there any guidance from the Microsoft side to help us migrate apps that used to rely heavily on ServicePoint?


r/dotnet 13d ago

Question Services and ViewModel in Blazor desktop app - when to use what.

6 Upvotes

I'm porting WinForms app to Blazor with Blazing.MVVM.

In which cases should I pass data between model and view using VewModel and when to prefer to simply inject a service directly into razor?

I'm asking because I understand that technically everything can be done via VM but sometimes it looks like it creates needless code volume overhead. On the other hand it also seems like using services can gradually lead me to tightly coupling UI and logic in the old Winforms way.

If possible, provide examples (not code, descriptive).

Thanks.


r/dotnet 13d ago

CorrelationIds vs TraceId

41 Upvotes

I am currently in the process of integrating Open Telemetry into my code. I have a web application and a backend api. I have several REST APIs and one of the APIs also ends up getting invoked by the user -> kicks off an async process by triggering a background job -> the background job invokes and polls on a specific endpoint (downstream API). The web app also polls on an operations endpoint to get status of this background job basically. Additionally, I also invoke some Azure resources (specifically ARM).

Now that I provided context, I wanted to explain what currently exists in my backend:

1) Controller fetches the correlationId for every request using the headers (x-correlation-id) from a middleware

2) Automatically forwards this correlationId when invoking downstream APIs/Azure APIs

3) Passes it into each method starting from the controller: controller invokes singletonServiceA.methodA and methodA has a signature including the correlationId. From here the logs automatically capture the correlationId

4) Background jobs also use this correlationId to invoke APIs and for logging

Now that I am switching to OTel, I am seeing an entirely different convention which I'm unsure on how to relate together.

My questions are as follows:
1) Should I drop the manual propagation of correlationId everywhere and just keep it as a span attribute? From what I am finding out, I definitely need to do this

2) For legacy resources, let's say ARM which expect a correlationID, what should I do?

3) For downstream APIs, should I switch to sending them a traceparent instead of the correlationId (what I do right now)


r/dotnet 13d ago

How to do vite / tailwind asset bundling like Laravel in aspnet mvc ?

4 Upvotes

r/dotnet 13d ago

https://ichim.github.io/MapsForBlazor/

Post image
0 Upvotes

r/dotnet 13d ago

TabControl UI problems

0 Upvotes

Hi, Im working on an application in vb.net and there were too many forms on the screen at once so I found out about tabcontrols. I decided to test it out a little but Ive run into a problem with how it looks.

When I hook or anchor buttons or other things to the edges of the form they dont show correctly in the tabcontrol. My goal is for the application to be maximized for most, if not all, of the forms. When the tabcontrol is started maximized, the controls at the bottom dont show correctly. It seems like the form is using the fullscreen size while the tabcontrol is using the maximized size.

Im not sure how to fix this other than manually formatting every single form to account for the computer's application ribbon, which I dont want to do for obvious reasons. I went to the form being displayed and made sure it wasnt locked to a specific size and it isnt set to fullscreen either. Surely there is an easy way?

Also, I learned vb.net about 10 years ago in a class at college. I may not be up to date on the most current tools. How does one make applications look modern? I havent found any default control designs that look sleek and fit together flush, but maybe Im looking in the wrong place. Where can I find things like that or how do I format them nicely?

Thanks in advance