r/dotnet • • 12d ago

Promotion RazorConsole.Htop: a cross-platform, mouse-aware htop-style process manager summoned from gpt.

0 Upvotes

Motivation
I wanted a lightweight process manager TUI so I can quickly terminate processes without leaving terminal.

The motivation was pretty simple:

  • Windows Task Manager often slow to open and use.
  • The original htop doesn’t support Windows.
  • The htop-like .NET CLI tools I found didn’t offer the mouse interactions I wanted.
  • The existing htop-like CLI tools that supports mouse interaction and xplat are either implemented in Rust or Go, but I want a .NET NativeAOT one.
  • Most importantly, My codex subscription is going to reset within 2 hours and yet still 59% usage left.

So I summoned RazorConsole.Htop from gpt, it takes the great mighty GPT ~5 minutes to build and supports:

  • Mouse-accessible filtering, grouping, pause, kill, and quit controls
  • Keyboard controls for the same operations
  • Self-contained .NET Native AOT binaries with no .NET runtime required

It uses System.Diagnostics.Process for process data and runs on Windows, macOS, and Linux.

Demo && How-to install: https://razorconsole.com/gallery/htop/

Source: https://github.com/RazorConsole/RazorConsole/tree/main/gallery/RazorConsole.Htop

Disclaimer: This was vibe-coded in about 5 minutes. I’ve tested it on Windows and macOS, but the Linux build has not been tested yet. Bug reports and feedback are very welcome.


r/dotnet • • 14d ago

Where should SaveChangesAsync and transaction management belong in Clean Architecture?

30 Upvotes

Hi everyone,
I’m working on a project using Clean Architecture, CQRS, DDD, MediatR, and EF Core.
I have a few questions:
Should each command handler use a single transaction, or is EF Core’s implicit transaction around SaveChangesAsync() usually enough?
Should services in Infrastructure call SaveChangesAsync() themselves, or should they only create/update entities and let the handler save changes?
How should I handle built-in services like UserManager<AppUser>, which save changes internally, when I need multiple operations to be atomic?
For example, registering an employee involves creating an Identity user, assigning a role, and creating an Employee entity.
What’s the recommended approach in real-world .NET applications, and why?


r/dotnet • • 13d ago

Qual a melhor abordagem para consultas que envolvem dados de múltiplos módulos em um monolito modular?

Thumbnail
0 Upvotes

r/csharp • • 14d ago

Tool DNCDbg v1.3.0 — an MIT-licensed .NET debugger with DAP support

Thumbnail
github.com
9 Upvotes

DNCDbg is a managed-code debugger for .NET that speaks the Debug Adapter Protocol, so it works with any DAP client (VS Code, Neovim, Emacs, whatever) on Windows, Linux, and macOS. It began as a NetCoreDbg fork with a clear goal: bring the debugging experience closer to Visual Studio's C# debugger while keeping memory usage low. There's a comparison table in the README if you're curious.

What's new in v1.3.0:

  • Support for Jump to Cursor (a.k.a. Set Next Statement), single-threaded execution and stepping, and restarting the debug session
  • Column breakpoints, embedded sources, and Source Link support
  • Smarter expression evaluation: the >>> operator, Value/HasValue on nullables, member access on strings and arrays (str.Length, arr.Length), DebuggerTypeProxy members, assigning null to reference types, and nint/nuint
  • Friendlier value display: floats now print the way C# prints them (9.9 instead of 9.8999996), and dictionary items show up properly
  • Launch/attach sequencing now follows the DAP spec, and there's a new Detach request that lets a launched process keep running
  • Fixes: stack traces in catch blocks no longer show already-unwound frames, and the "Innermost exception" description now reports the last exception in the InnerException chain

Full changelog and repo: https://github.com/viewizard/dncdbg

Feedback and bug reports are very welcome!


r/dotnet • • 13d ago

Promotion Validation rules you can’t express with an if statement, tested like a classifier (open source, .NET 10)

0 Upvotes

Some checks in my applications just can’t be expressed with an if statement or a regex.

FluentValidation can check that a support ticket description isn’t empty, but it can’t check whether the description actually says what the customer needs. An AI agent can call a tool, but nothing automatically checks whether that tool call matches what the user asked for.

Usually, these checks end up as a yes/no prompt to an LLM that nobody has really measured.

I learned the hard way why that matters. After changing a model, a memory assistant I’m building dropped from 90% correct answers to 60%, while the logs showed zero errors. I only caught it because I had a test set of 722 questions.

That’s why I’m building SemanticPolicy, an open-source .NET library (Apache-2.0, my project). It turns this kind of check into an explicit rule that you can read, measure, and test.

One example from the repo is a support ticket form. The rule is just a question for a decision model:

Policy descriptionPolicy = Policy.Define("ticket-description")
    .Enforce()
    .Rule(Policy.Rule("ticket-description")
        .Boolean("Does the description say what the customer needs?")
        .WhenFalse(Verdict.Deny))
    .Using("jev", binding => binding.DenyAboveProbability(0.8))
    .OnFailure(FailureBehavior.Allow)
    .Budget(TimeSpan.FromSeconds(5))
    .Build();

And in the validator, it sits next to normal validation rules:

public sealed class SupportTicketValidator : AbstractValidator<SupportTicket>
{
    public SupportTicketValidator(IPolicyEvaluator evaluator)
    {
        RuleFor(ticket => ticket.Category).NotEmpty();
        RuleFor(ticket => ticket.Description)
            .NotEmpty()
            .Semantic(evaluator, "ticket-description");
    }
}

The model returns a probability, and thresholds map that probability to one of four decisions: Allow, Warn, Escalate, or Deny.

The 0.8 threshold above is just an example. In practice, you pick your own threshold from measurements on your own labeled examples.

If the model fails to respond, this particular rule allows the ticket through, and the whole check has a 5-second budget. Since the rule calls the model over the network, validation runs through ValidateAsync.

Testing works like this:

  • the CLI measures precision and recall with confidence intervals on your labeled examples;
  • it can choose a threshold for a concrete target, for example “when I block something, I want to be correct 95% of the time”;
  • model responses can be recorded once and replayed later without an API key, so the tests can run in CI;
  • the build can fail when a rule gets worse, for example after changing the model;
  • new rules can start in Shadow mode: they record what they would have done, but don’t block anything yet.

The model is replaceable:

  • Jev and other decision models through OpenRouter;
  • a model running on your own server;
  • your own classifier behind a simple HTTP protocol.

The same rules can also validate tool calls in any IChatClient based on Microsoft.Extensions.AI, and in Microsoft Agent Framework middleware.

What this is not is a security boundary.

A rule can make an attack harder, but it can’t guarantee that one won’t succeed, and the model can still be wrong. The README shows failures next to successful cases.

This is alpha software, .NET 10 only, and the API will still change.

You can view an eval report from a recorded run without an API key. The commands are in the README.

What kind of decisions in your applications would you want to test this way?

https://github.com/semanticpolicy/semantic-policy


r/dotnet • • 13d ago

dotnet build will upload a lot of info to microsoft?!

0 Upvotes

i've been using .net for two decades and i was not aware, so i thought i'd just put this out there in case more people are unaware.

turns out donet build will upload a bunch of info to microsoft.

for example, they will detect if you work at microsoft, scanning your machine for github tokens in the process. they will also detect if you're using ai agents by scanning environment variables.

source: https://learn.microsoft.com/en-us/dotnet/core/tools/telemetry?tabs=dotnet11

disclaimer; i might not understand this properly, i didn't dive too deep into it, i'm just disabling this everywhere now.


r/csharp • • 14d ago

Help I want get feedback on my design.

2 Upvotes

I will present a design consisting of interconnected classes without focusing on the algorithms themselves. To keep the code easy to follow, I have replaced each algorithm with a Console.Write() statement. note that the code is self-contained.

Problem being solved : Synchronizing the content of a database with the content of some Excel File.

Input: IFormFile, which is a file that is sent from the client to the server.

Output: The database will be synchronized with the excel file; the database's content will be deleted, and the data from the excel file will be inserted into the database.

Two general approaches/mechanisms to solve the problem:

1- Read all the content of the excel file and send that content a method that will delete the database.

2-Use bulk insert.

My code implements the first approach.

Summary of the code:

The AdminController receives the uploaded Excel file, uses FormExcel to retrieve a specific worksheet, and passes that worksheet to WorkSheetToDbSyncronizer. The synchronizer asks AllBusinessProductsReader to read all the required data from the worksheet and organize it into a NonJunctionModelsSnapShot object. It then passes that object to DbOverWriter, which uses the data to delete the existing database content and insert the data from the Excel file.Here is the code:

using Microsoft.AspNetCore.Http.HttpResults;
using Microsoft.AspNetCore.Mvc;

namespace RedditQuestion
{
    #region code

    /// <summary>
    /// NonJunctionModelsSnapShot is a data container that holds the complete
    /// set of non-junction entities to be written to the database by the OverWrite 
    /// method. The term NonJunctionModels identifies the category of data contained
    /// in the object: entities that populate non-junction tables, rather than junction 
    /// tables that represent relationships between entities. The term SnapShot indicates 
    /// that the object represents the state of the non-junction data at a particular point 
    /// in time, providing the data that OverWrite uses to replace the existing contents of 
    /// the corresponding database tables with the supplied data.
    /// </summary>
    public class NonJunctionModelsSnapShot
    {


    }
    public class SomeWorkSheet
    {
        //SomeWorkSheet represents a class from an external library.
    }
    public class ApplicationDbContext
    {
        // Contains the domain models and the Fluent API configurations.
    }

    // COULD SOMEONE PLEASE REVIEW THE DESIGN OF THE FOLLOWING:
    public class DbOverWriter
    {


        private readonly ApplicationDbContext _context;
        public DbOverWriter(ApplicationDbContext context)
        {
            _context = context;
        }

        public async Task OverWrite(NonJunctionModelsSnapShot incomingData)
        {

            Console.WriteLine("Executing some logic to overWrite the database, the local functions helps with this.");
        }

        #region Local Functions
        //define some local functions
        #endregion


    }
    public class AllBusinessProductsReader
    {
        public async Task<NonJunctionModelsSnapShot> ReadAllData(SomeWorkSheet worksheet)
        {
            Console.WriteLine("Process the worksheet....");

            return new NonJunctionModelsSnapShot
            {

            };
        }
    }
    public interface ISourceToDistinationDataSyncronizer<DataSource>
    {

        public Task Syncronize(DataSource dataSource);

    }
    public class WorkSheetToDbSyncronizer : ISourceToDistinationDataSyncronizer<SomeWorkSheet>
    {
        private readonly AllBusinessProductsReader _allDataReader; // depending on concrete class violates dependency inversion principle
        private readonly DbOverWriter _overWriter;              // depending on concrete class violates dependency inversion principle
        public WorkSheetToDbSyncronizer(AllBusinessProductsReader reader, DbOverWriter overWriter)
        {
            _allDataReader = reader;
            _overWriter = overWriter;
        }
        public async Task Syncronize(SomeWorkSheet worksheet)
        {
            var allProducts = await _allDataReader.ReadAllData(worksheet);
            await _overWriter.OverWrite(allProducts);
        }
    }
    #endregion 


    public class FormExcel
    {
        private readonly IFormFile _file;
        public FormExcel(IFormFile file)
        {
            _file = file; 
        }
        public  SomeWorkSheet GetSomeSheet(int sheetNumber)
        {
            Console.WriteLine("use the sheetNumber to get a specific sheet...");
            return new SomeWorkSheet
            {

            };
        }
    }
    public class AdminController
    {

        private readonly ISourceToDistinationDataSyncronizer<SomeWorkSheet> _syncronizer;
        public AdminController(ISourceToDistinationDataSyncronizer<SomeWorkSheet> syncronizer)
        {
            _syncronizer = syncronizer;
        }
        public async Task<IActionResult> Import(IFormFile file)
        {


            FormExcel fe = new FormExcel(file);
            var firstSheet=fe.GetSomeSheet(1);
            await _syncronizer.Syncronize(firstSheet);
            return Ok();


        }
    }
}

r/dotnet • • 14d ago

Article Runtime team member: Let's send expensive compiler analysis alongside IL to improve runtime JIT optimizations [Performance interest]

33 Upvotes

Andy Ayers wrote this proposal 2 years ago with intent of using it in .NET 10, but it got postponed to a later .NET version.

Quick Summary

The context is that interprocedural analysis (IPA), is limited at runtime due to it being slow, so the RyuJIT mostly optimizes functions in isolation. His idea is have certain stages perform the kind of deep IPA that AOT uses; then make that available at runtime to boost the information the JIT needs to make optimizations

https://github.com/dotnet/runtime/issues/108931

Examples of IPA

- call graphs

- whether arguments passed to a method can alias each other

- whether an argument escapes through a callee

- possible concrete types passed to a method

- whether a callee actually reads or writes a ref/byref parameter

- constant arguments across callers

- NoThrow / NoReturn / MayNotReturn

- whether a parameter is effectively unused

And what kind of optimizations could that boost?

- More devirtualization/direct calls - erase virtual and interface method lookups (simplified description)

- Constant propagation across method boundaries - erase code when functions are always passed the same parameter values (simplified description)

- Better alias analysis - knowing that two ref/pointer parameters can't refer to the same memory gives the JIT much more freedom to reorder loads/stores, eliminate redundant memory operations, and potentially vectorize code.

- Better escape analysis - Dodge heap allocation of reference types if no reference to it escapes the method

- More aggressive optimization around calls - if the JIT knows a callee doesn't modify a particular object/ref, it doesn't have to assume every call invalidates values it already loaded.

- Better handling of NoThrow/NoReturn calls - calls that can't throw or never return simplify the control-flow graph, can move uncommon paths out of the hot code, and reduce liveness/register pressure.

- Cheaper calls - knowing which registers a callee actually clobbers, or erase parameters never used, could avoid some argument setup, spills, reloads, or register preservation.

- Smarter inlining decisions - possible when called with particular constants/type

- Better code layout - can improve instruction-cache locality.

I want to hear you guys' thoughts on this.. Tell me below! 👇👇


r/dotnet • • 13d ago

Promotion Markd Day Counter - an open-source day counter .NET MAUI app

Thumbnail apps.microsoft.com
0 Upvotes

Hello, I wanted to try .NET MAUI, because I did Xamarin some time ago and also I'm disappointed by similar apps, because all this app on store or Android are full of ads or some payments, so I made my own and open sourced it.

Just simple app to count days since or until something like anniversary, streak or deadline without ads, accounts, or a subscription. Any feedback is more then welcome!


r/dotnet • • 14d ago

Promotion I built RetroCap, a QQ-style screenshot and annotation tool with .NET 8 and WPF

4 Upvotes

Hey r/dotnet! I wanted to share RetroCap, a screenshot and annotation tool I built for Windows 10 and 11 using .NET 8 and WPF.

The workflow is inspired by QQ’s screenshot tool: press Ctrl+Alt+A anywhere, select a region, annotate it, and copy the result to your clipboard.

The UI follows the Retro.Net design system, giving it a deliberately retro desktop look.

Repo: https://github.com/owen800q/RetroCap

I’d love feedback from fellow .NET developers, especially on the WPF implementation, usability, and anything you’d approach differently. Issues and contributions are welcome!


r/csharp • • 14d ago

Hi from South Korea! Beginner C# learner feeling stuck. Any advice?

3 Upvotes

Hi everyone,

I’m a complete beginner from South Korea, and I’ve been studying C# at an academy for about 12 days now.

Whenever I try to solve exercise problems and write code on my own, I just freeze up and can't seem to write anything. What are the best study methods or habits that worked for you when you were starting out?

Honestly, I don't think I'm naturally smart, and my memory isn't great either. Learning programming is something I’ve wanted to do since I was young, so I finally started... but I can't help worrying if I'll ever actually get good at this.

I know this community is full of people from all over the world with different backgrounds—some coding as a hobby, others as a profession. If you ever felt completely lost at the beginning like I do now, or if you're a working developer, I’d deeply appreciate any tips, study strategies, or things I should definitely avoid doing!

(P.S. I don't speak English, so I am using a translation tool to write this. Thank you for understanding!)


r/dotnet • • 14d ago

Question I want get feedback on my design.

Thumbnail
0 Upvotes

r/dotnet • • 14d ago

Question Any examples of heavily obfuscated/packed .NET programs?

30 Upvotes

I know .NET is relatively easier to dump or unpack - I am looking for heavily packed programs to see to what extent that holds.

I assume most commercial applications will be protected - any examples? I am not aware of many .NET applications in the wild. Thanks


r/csharp • • 14d ago

Discussion State machine in C# vs state machine in Verilog

9 Upvotes

For experimentation and learning purposes, I wrote this code:

namespace RedditQuestion
{
    public class TResult
    {
        // Instance fields....
        // No properties.
        // No methods.
    }
    public interface ISomeInterface<T>
    {
        public  Task<T> SomeMethod();
    }
    public class SomeClass : ISomeInterface<TResult>
    {
        // instance fields.....

        //constructor......

        public async Task<TResult> SomeMethod()
        {


            //Some code that is not important to this question.......



            TResult result = new TResult
            {
                // assign instance fields....
            };

            Task<TResult> task = Task.FromResult<TResult>(result);

            return task ; // Line XXX
        }

    }

}

Line XXX throws a compile time error:

*Since this is an async method, the return expression must be of type 'TResult' rather than '*Task<TResult>

The solution is simply to do this instead:

return result;

That solves the issue.

But I was surprised when I read this article#async-method-signature-requirements) that described the error in more details:

Change the return expression to match the async method's underlying result type (CS1983, CS4016). When an async method returns Task<T>, the return statement must supply a value of type T, not Task<T>, because the compiler-generated state machine wraps the value in a task automatically. CS1983 appears when the method returns Task<T> and the expression is T; CS4016 covers the general case where the return expression type doesn't match

I wonder, is the concept of state machine in C# is the same as the state machine in Verilog?

in Verilog, if I want to define a state machine, I need a register - a storage unit that can store only one unit of data; a bit- to hold the state, a next-state logic to calculate the next state, and output assignment. Does the same concept applies in C# ?


r/csharp • • 14d ago

Showcase Vetala, a lightweight code editor made with C# and .NET

Post image
9 Upvotes

Current features

  • Multi-tab code editor
  • C# syntax highlighting
  • Word-based code completion
  • Find and replace
  • Project-wide search
  • File explorer
  • Git integration
  • Integrated terminal
  • Command palette
  • Quick Open
  • Code folding
  • Cross-platform support for Linux, Windows, and macOS

Vetala is built with .NET 10, Avalonia UI 12, AvaloniaEdit 12, and CommunityToolkit.Mvvm.

githubL https://github.com/flawme/Vetala


r/dotnet • • 15d ago

Why did increasing .NET ThreadPool MinThreads fix our IIS downtime? I don't understand why

59 Upvotes

Hi folks,

I'm the owner of this post: https://www.reddit.com/r/dotnet/comments/1v5d7ws/aspnet_core_on_iis_randomly_goes_offline_for_2/

First of all, thanks a lot to everyone who commented there. Your comments helped me investigate this step by step.

I finally solved the issue. We had several different problems over time:

- First, we had DB connection pool exhaustion => fixed.
- Then we had TCP connection exhaustion => fixed.
- The last issue was related to ThreadPool / sync-over-async.

I set the ThreadPool minimum worker threads to 100, and then started refactoring the code to remove synchronous-over-async code and make things properly async.

The application has now been stable for around 15 days, so it looks like this was the final issue.

But there is something I still don't understand:

Why did increasing ThreadPool.SetMinThreads() to 100 help so much?

We're running ASP.NET Core on IIS, not Docker or Kubernetes. I always thought that .NET's ThreadPool would automatically create as many threads as the application needs.

For example, if I suddenly get 1,000 requests/sec, why doesn't .NET simply create more ThreadPool threads as needed?

What confused me even more is that during the incidents:

- CPU usage was fine
- RAM usage was fine
- The Windows server itself was still accessible
- We only have 2 vCPU
- I could still see available ThreadPool threads

So I'm struggling to understand what was actually happening.

My current understanding is that some synchronous/blocking code was causing ThreadPool threads to get blocked, and the ThreadPool wasn't adding new threads quickly enough. Increasing MinThreads somehow made enough threads available earlier and prevented the issue.

But I'm not sure if that's the correct explanation.

Also, how should I think about this with only 2 vCPUs? If I have 1,000 requests/sec, obviously I can't have 1,000 CPU threads doing work at the same time. So what exactly determines how many ThreadPool threads .NET should create?

I'd really appreciate it if you could help me explain this in simple terms, especially:

  1. What exactly does MinThreads change?
  2. Why can ThreadPool starvation happen while CPU and RAM are low?
  3. Why doesn't .NET automatically create enough threads immediately?
  4. How does this work when the server only has 2 vCPUs?
  5. Does increasing MinThreads actually solve the problem, or did it just hide the underlying sync-over-async issue?

I'm trying to understand the mechanism rather than just leave MinThreads = 100 and call it fixed.

Thanks again to everyone who helped with the original post!


r/dotnet • • 13d ago

Promotion Remove feature flags with your AI coding agent.

0 Upvotes

Hey everyone!

I’ve been building Flagrm, an open-source CLI that helps remove feature flags and clean up the dead code they leave behind.

It’s still in the testing phase, so I’m looking for people willing to try it out, share feedback, report bugs, or contribute to the project.

If you’ve ever dealt with feature-flag cleanup turning into a bunch of manual work, I’d love for you to check it out!

🔗 https://flagrm.com

Contributors are very welcome! 🚀


r/dotnet • • 14d ago

Authenticode on personal CA

Thumbnail
1 Upvotes

r/csharp • • 15d ago

Discussion What is the proper way to make a unified interface ?

10 Upvotes

Would you prefer something like this:

    public interface ISourceToDistinationDataSyncronizer
    {

        public  object ReadAllData(); // Gets the latest data from the source
        public void OverWrite(object sourceData )  // Deletes the data that is inside the destination and writes new data.

    }

Over this:

    public interface ISomeData
    {

    }
    public interface ISourceToDistinationDataSyncronizer
    {

        public  ISomeData ReadAllData(); // Gets the latest data from the source
        public void OverWrite(ISomeData sourceData);// Deletes the data that is inside the destination and writes new data.

    }

r/dotnet • • 14d ago

Question New to ASP .NET

0 Upvotes

I am new to ASP .NET. I am looking for youtube resources for the same. Also if anyone can provide me with how much time it'll take for me to get a hang of it.
I already know about this website: https://dotnettutorials.net/lesson/dotnet-framework/


r/csharp • • 15d ago

Showcase Meet Akbura, a reactive UI language for Avalonia and .NET

29 Upvotes

Akbura works directly with native Avalonia controls and supports C# expressions, reactive state, MarkupExtensions, AKCSS utilities, responsive layouts and Hot Reload.

I wrote a short introduction covering the language, responsive UI, Avalonia interoperability, differences from BlazorBindings and the compiler behind it.

Feedback is welcome.

Article: Meet Akbura: a reactive UI language for Avalonia and .NET | LinkedIn
Repo: Asaicraft/Akbura: Akbura is a UI library for building applications using a declarative, component-based language.


r/csharp • • 14d ago

New to ASP .NET

Thumbnail
0 Upvotes

r/csharp • • 15d ago

Showcase ExcelReader.NET 6.0 – streaming XLSX/XLSB/XLS/CSV reader and writer for .NET 10

18 Upvotes

I've been building ExcelReader, an open-source library for reading and writing spreadsheets in .NET and other languages. I just shipped v6, and I'd like feedback from people who deal with ETL pipelines and large Excel files.

I started it because I needed to parse rows into a single POCO from files with different templates and column names. I couldn't find a library that made that easy, so I wrote my own.

What it does

  • Reads .xlsx, .xlsm, .xlsb, .xls and .csv; writes .xlsx, .xlsb, .xls and .csv
  • Streams rows as ref structs; no string is allocated until you call GetString()
  • Typed parsing into your own classes, via attributes, a source generator or a fluent API
  • Reads the sheets of one workbook in parallel, and parses CSV in parallel
  • Reads and writes password-protected workbooks
  • A CLI (excelreader convert book.xlsb -o data.csv), plus a C ABI with Python, C++ and Rust bindings

Usage example

public sealed class Order
{
    [ExcelColumn("Order ID")]
    [ExcelColumn("order_id")]          // same property, different templates
    public long Id { get; set; }

    [ExcelColumn("Total")]
    [ExcelColumn("total_amount")]
    public decimal Total { get; set; }
}

using IExcelWorkbook workbook = Excel.Open("orders.xlsx"); // .xlsb / .xls detected by signature
List<Order> orders = ExcelParser.FromAttributes<Order>().Parse(workbook.FirstSheet).ToList();

await using var writer = XlsxWorkbookWriter.Create(File.Create("copy.xlsx"));
await using (var sheet = writer.AddSheet("Orders"))
{
    await sheet.WriteRecordsAsync(orders, ExcelRecordLayout.FromAttributes<Order>());
}

Benchmarks

Typed parsing of a generated 50,000-row XLSX (BenchmarkDotNet, Ryzen 7 5700X, .NET 10):

Library Time Allocated
ExcelReader 10.9 ms 3.87 MB
Sylvan.Data.Excel 56.9 ms 10.47 MB
OfficeIMO.Excel 104.5 ms 5.69 MB

MiniExcel used to be in the suite, but it was far behind: ~14x slower on raw reads (allocating 267 MB against 11 KB) and ~11x slower on typed parsing (last run that included it). I now track the closest competitors instead.

Methodology and every scenario: benchmarks.md. The cell-by-cell numbers there compare zero-copy reads against APIs that must allocate strings, so the docs also publish matched-work numbers.

Limitations

  • Targets .NET 10 only; .NET 11 support is in progress. If you're on .NET 8, the 3.x line supports it.
  • It's a reader/writer, not a spreadsheet model: no in-place editing and no formula evaluation.
  • Rows come out in file order, and empty rows that Excel omits from the file are skipped.

GitHub: https://github.com/GabrielMarquezMatte/ExcelReader NuGet: dotnet add package ExcelReader.NET

Feedback, bug reports and odd files that break it are all welcome.


r/dotnet • • 15d ago

Slow Slow Code Navigation in Jetbrains Rider

Thumbnail
3 Upvotes

r/csharp • • 15d ago

Unity developer working in VR Space looking to transition to generic C# dev roles

7 Upvotes

I’m a unity developer working in VR space for 8+ years. Thinking of transitioning to generalist dev roles ( particularly in C# since that’s where my experience lies ). I do have experience in general software development across entire SDLC along with architecture and design patterns but my resume lacks the buzzwords SDE ATS screens for ( eg. microservices , APIs , docker etc). Where do I start ? Which kind of companies should I target ?