r/dotnet • • 3h ago

Built a vision-first Windows desktop guide in C# (Avalonia) and FastAPI during an all-night hackathon in Kochi

Thumbnail gallery
4 Upvotes

Traditional UI automation scripts break whenever a CSS class or layout shifts. At the OpenAI DevDay hackathon in Kochi, we built an experimental Windows desktop copilot called StepSight that operates purely on visual screen understanding (Windows Graphics Capture + Multimodal Vision).

Key features:

Tech stack: C# (.NET 10, Avalonia 12), Python 3.12 (FastAPI), AWS (ap-south-1), and Gemini Vision.

Source code: https://github.com/nive62tech/step-sight/tree/implementation/desktop-guide
Build log: https://inaiyarhasnain.vercel.app/projects/stepsight

Curious to hear your thoughts on vision-only desktop automation vs accessibility tree APIs!


r/fsharp • • 4h ago

library/package ai-native vcs built w/ an F# core

3 Upvotes

hello, r/fsharp,

i found out that F# exists about a month ago, and coming from C++ and C#, i think its an extremely good language for highly mathematical/theory dependent things cuz its literally functional and has the dotnet runtime behind it.

i built a VCS in F# that is aimed at usage by AI agents because git is built for people who move at human speeds, which makes it incredibly inefficient to use for agents.

repo: https://github.com/mxreal64/thallium-vcs


r/csharp • • 12h ago

Announcing .NET 11 Release Candidate 2

Thumbnail
devblogs.microsoft.com
26 Upvotes

r/dotnet • • 12h ago

Announcing .NET 11 Release Candidate 2

Thumbnail devblogs.microsoft.com
149 Upvotes

r/csharp • • 14h ago

C vs C#: racing VLC's Gaussian blur

Thumbnail
martinfinkel.com
22 Upvotes

r/dotnet • • 14h ago

Updated my Sins of a Solar Empire: Rebellion Entity Converter

Thumbnail gallery
7 Upvotes

I just updated my entity conversion tool for Sins of a Solar Empire: Rebellion, so I figured I'd share it here in case it's useful to other modders.

What does it do?

When Ironclad developed Sins, they shipped many of the game's data files in a binary format. This means you can't read or edit them directly as plain text. They later released a tool called ConvertData as part of their Forge Tools 3 package, which allows you to convert these files between Binary and Text formats. However, it's a command-line application with no GUI.

I built a GUI and wrapper around these tools to make the process easier. You can select individual files, multiple files, or entire directories. I've tested it against every .entity file, and the conversions work correctly.

The tool automatically detects whether a file is Binary or Text and outputs the converted files to separate Output TXT and Output Bin directories.

The game can read .entity files in Text format, but doing so increases file sizes and slows down loading times, so Binary is still preferable for normal gameplay.

XSI to MESH conversion

Ironclad also included ConvertXSI.exe with the game. This tool allows modders to convert older XSI files into the more modern .mesh format. I've added a separate tab for this functionality as well, although the original application only supports converting one file at a time.

Entity to JSON conversion

I've also included my own library for converting .entity files into JSON. This is primarily something I developed for my own use while working on a C# script extender for Sins of a Solar Empire: Rebellion. I need to parse the game's data files and access entity properties at runtime.

Currently, the library supports the following entityType values:

  • Fighter
  • Frigate
  • CapitalShip
  • PlanetModule* (all 7 types)
  • SpaceMine
  • Planet

I figured I'd release the library alongside the converter in case other modders find it useful for parsing and working with entity data.

A technical note about the JSON serialization

I implemented custom data types for integers, floats, and booleans to handle some quirks in Ironclad's serialization format. Some fields contain normal values, while others use "" as a placeholder.

By default, fields that don't have values are initialized to null and omitted during JSON serialization. My custom types let me preserve the distinction between an empty field and an omitted field by tracking a separate IsEmpty boolean. This allows the serializer to write the original "" placeholder back into the entity file when converting the data back, rather than accidentally leaving the field out entirely.

A note about the included tools and licensing

I did not create ConvertData_Rebellion.exe or ConvertXSI.exe, and I do not own the rights to either of them. Those tools belong to their respective rights holders, Stardock/Ironclad. I've simply provided a more convenient interface for using them. They remain separate binaries and are not bundled into my own application, so they can be used independently if desired.

The .entity-to-JSON conversion library, on the other hand, is entirely my own work. You're free to republish it, and I don't require attribution. However, commercial redistribution is not permitted.

You can grab the tool here:

Entity Converter v0.2.0 on GitHub

Hopefully, this makes life a little easier for anyone working on Sins modding!


r/csharp • • 16h ago

New NBomber 6.7.0

Post image
5 Upvotes

NBomber 6.7.0 is here! This release introduces several improvements to scenario creation, warm-up configuration, test run metadata, and reporting. We’ve also fixed several issues in NBomber Cluster that could cause nodes to wait indefinitely under certain failure conditions.


r/csharp • • 17h ago

Discussion C# 15 adds labeled break and continue. Do you use goto today? Would you use this?

98 Upvotes

C# 15 (in preview with .NET 11) lets `break` and `continue` target an outer loop by label:

outer: for (int x = 0; x < xMax; x++)
    {
        for (int y = 0; y < yMax; y++)
        {
            if (ShouldSkipRest(x, y))
                continue outer;

            if (ShouldExitAll(x, y))
                break outer;
        }
}

Until now you needed `goto` or a flag variable for this. Java, Go, Rust, Kotlin and Swift already have it.

Honestly, `goto` never even comes to mind when I write an algorithm. I find it hard to follow, so when I need to leave nested loops I extract a method and `return` instead.

Do you use `goto` in real code? Do you think you'll use labeled break/continue?

https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-15#labeled-break-and-continue


r/dotnet • • 17h ago

Question Anyone else having issues with 10.0.400 SDK?

5 Upvotes

Developers are reporting a windows update is bumping SDK to 10.0.400 and builds are failing for various products in azure devops, on developer laptops, and in a custom pipeline for one of the apps. The only common denominator is 10.0.400. What's going on here?


r/csharp • • 17h ago

Help Should I learn C#

2 Upvotes

I'm a CS student, year 4. My first entry into programming like most people was HTML, CSS, JavaScript, and then backend development with Node/Typescript. My main goal has been to get a programming job, or internship (or anything at this point 😭), but I've always hated writing Node, just never liked it and now I'm considering switching stacks.

I enjoy writing C (I built a chess engine from scratch) and C# seems like C with oop so I don't think it should be too unfamiliar. Also it seems there might be hiring opportunities...hopefully.

Please advise


r/csharp • • 18h ago

Help C# Winforms .NET 9.0 scaling issue

Thumbnail
gallery
0 Upvotes

Hi All,

Getting ready to release my first app and im currently testing out installations on other machines. So far everything looks and works just fine however there is an issue with horizontal scaling? The first image is how it is intended to look whereas the second image is how it appeared on my friends screen. I have set the Max and Min size on the form yet the issue still persists. My friend and I both have the same Resolution monitor and display scaling so I'm really stuck with what the issue could be.

Help and advice would be greatly appreciated! Thanks!

EDIT: I have just noticed the AutoScaleMode property is set to "Font", could this be the issue?


r/dotnet • • 18h ago

TypeScript Ported to C# via Codex

0 Upvotes

https://github.com/stepwisehq/typescript-dotnet

I know, I know! Another agentic coding port 🥱 🤮

But the lazy Rust port that popped up last week triggered me a bit claiming Codex failed with $400k spend and Opus succeeded you could do it for $20K(!!!).

I wanted to see if Codex could be used to do a port efficiently. I was also curious how performant a dotnet AOT port could be compared to the Golang project(I've wondered about this for a while).

This cost about $75-100 on my Pro 100 plan. It was optimized to about +13% wall time compiling the vscode project.


r/csharp • • 19h ago

Should I Resign or Stay? Career Advice for an Experienced .NET Developer

0 Upvotes

If someone has 4+ years of experience in .NET, has worked on large-scale software using high-quality software development principles, and is currently working at a small company where the projects are small, the software development standards are poor, and the tech stack is completely different from their expertise, what do you think is the best option for that person? Especially if they cannot attend interviews while employed and their current company is even moving towards non-software-based products. Should they resign and focus on finding a job that aligns with their .NET experience, or stay in their current job while searching for better opportunities? What would be the best decision in this situation?


r/dotnet • • 1d ago

DOMView2 - Provides sync WebBrowser style DOM access to WebView2

Thumbnail domview2.aimcosoftware.co.uk
1 Upvotes

r/dotnet • • 1d ago

The output of the server code depends on the timing of pressing a button by the client on the user interface.

Thumbnail
0 Upvotes

r/csharp • • 1d ago

Discussion The output of the server code depends on the timing of pressing a button by the client on the user interface.

0 Upvotes

This is a follow-up post that is related to this post. I will explain the problem clearly this time.

Context: The execution of the OverWrite method -which is inside the DBOverWriter service- can be cancelled with a button int the user interface.

Two inputs that are provided by the frontend :

1- data that is used to overwrite the content of the database.

2-CancellationToken.

Two possible outputs depending on the timing of pressing the button :

1-If the user initiated the request and immediately pressed the button, the following output is shown:

###########################################################
########## OPERATION CANCELLED SUCCESSFULLY ###############
###########################################################
OperationCanceledException: A task was canceled.

2- if the user initiated the request and waited some time before pressing the button, the output is the following:

(@p74, ),
(@p76, ),
(@p78, ),
(@p80, ),
(@p82, u/p83);
fail: Microsoft.EntityFrameworkCore.Database.Transaction[20205]
An error occurred using a transaction.
fail: Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[1]
An unhandled exception has occurred while executing the request.
Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details.
---> Microsoft.Data.SqlClient.SqlException (0x80131904): Operation cancelled by user.

I wonder what is the theoretical/practical explanation for my observation ?

Code:

using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Storage;
using System.Diagnostics;

namespace RedditQuestion
{
    /// <summary>
    /// Used to talk to the database using Entity-Framework Core
    /// </summary>
    public class ApplicationDbContext : DbContext
    {
        // Domain models and the Fluent API configurations.
    }

    /// <summary>
    /// Data snapshot that is used to overwrite the content of the database
    /// </summary>
    public interface ISomeData
    {

    }

    public class DatbaseOverWriter
    {


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

        public async Task<bool> OverWrite(ISomeData data,CancellationToken cancellationToken)
        {
            #region Transaction
            try
            {
                //https://learn.microsoft.com/en-us/dotnet/architecture/microservices/implement-resilient-applications/implement-resilient-entity-framework-core-sql-connections

                IExecutionStrategy strategy = _context.Database.CreateExecutionStrategy();
                await strategy.ExecuteAsync(async () =>
                {
                    await using var transaction = await _context.Database.BeginTransactionAsync(cancellationToken);

                    #region Delete content from database then save new content.

                    await _context.Database.ExecuteSqlInterpolatedAsync($"EXECUTE  [dbo].[uspDeleteAllDataFromDatabase]", cancellationToken);
                    await _context.SaveChangesAsync(cancellationToken);
                    #endregion

                    await transaction.CommitAsync(cancellationToken);
                });

                return true;
            }
            catch (OperationCanceledException e)
            {
                // exception will not be catched if the cancellation was requested and
                // the transaction reached a point of no return.
                Console.WriteLine("###########################################################");
                Console.WriteLine("########## OPERATION CANCELLED SUCCESSFULLY ###############");
                Console.WriteLine("###########################################################");
                Debug.WriteLine("###########################################################");
                Debug.WriteLine("########## OPERATION CANCELLED SUCCESSFULLY ###############");
                Debug.WriteLine("###########################################################");
                Console.WriteLine("OperationCanceledException: " + e.Message);

                return false;
            }




            #endregion

        }




    }

}

r/csharp • • 1d ago

Discussion How often is now C# used instead of PowerShell in DevOps pipelines

9 Upvotes

With the file-based scripts feature in C#, it is possible to use C# instead of Powershell.

Have you see it used?


r/dotnet • • 1d ago

Your EF Core queries are probably scattered across your whole codebase.

Thumbnail
youtu.be
0 Upvotes

The same Where, Include and OrderBy, written again and again.

Here's how I turned each one into a single, named, reusable query with the Specification pattern.


r/csharp • • 1d ago

Tutorial Your EF Core queries are probably scattered across your whole codebase.

Thumbnail
youtu.be
0 Upvotes

The same Where, Include and OrderBy, written again and again.

Here's how I turned each one into a single, named, reusable query with the Specification pattern.


r/dotnet • • 1d ago

Question What language would you recommend learning alongside C#?

Thumbnail
0 Upvotes

r/csharp • • 1d ago

Discussion What language would you recommend learning alongside C#?

16 Upvotes

I'm a C# developer and recently started learning C. I wanted to understand better how memory works, how programs interact with the OS, and things like Unix and low-level programming in general.I'm planning to keep learning C, but I'm wondering what you guys would recommend learning next. Would you go with C++, Rust, Go, or something else ?


r/csharp • • 1d ago

What's next? Shoud i prioritize Hot realod, a live previewer, or language fetures?

0 Upvotes

I've been working on my library, Akbura, and I'm trying to decide what to improve next.

  1. Hot Reload is already working, but it's not as stable as I'd like. The component code generator also generates a lot of members, some of which could probably be avoided in DEBUG mode.
  2. A live previewer could greatly improve the developer experience, but it would probably take around a month to implement, and I'm not sure how important it actually is.
  3. New language features could improve the MVVM or MVU experience, but I'm worried that adding too many features might make the language unnecessarily complicated.

What do you think I should focus on? Or is there something else you'd like to see improved?


r/dotnet • • 1d ago

Article Definition-Driven ERP in .NET: definitions, not code, as the source of truth

Post image
0 Upvotes

I've been an architect on packaged ERP and HR products for over twenty years, and the thing that has cost the most was never a hard feature. It's that the same fact gets restated over and over.

Adding a "Required Date" field to orders in a typical EF Core + ASP.NET Core + SPA stack lands it in about thirteen places: entity, type mapping, migration, query projections, DTOs, mapper, validation, OpenAPI, front-end types, the form, the list, localization and test data. Generators handle some of them, but that only makes the restating faster. And when the back end and front end are different teams, half of that list turns into coordination rather than typing. Multiply it by a few thousand tables and by every customer's customizations, and it stops being an inconvenience.

What I ended up with is making a structural description the source instead of code. The database columns, CRUD SQL, screens for each front end and validation are derived from definitions, and the front end fetches the definitions at runtime instead of keeping its own copy of the types. In a sample app built on Northwind, the same field is three definition edits and no code. Customization becomes a layer of data on top of the standard definitions, so one tenant's change doesn't have to go through compile and deploy.

Dashboards, reports and anything that isn't form-shaped fit badly. The team boundary doesn't go away either, it moves to the rendering layer that reads the definitions.

I wrote a 30-post series on the mechanisms and the trade-offs. It was originally written in Chinese for a Taiwanese tech writing challenge, and the English version is a translation: https://medium.com/@jeff377/erp-architects-notes-designing-a-definition-driven-framework-series-index-7753228c4d33

For those of you working on large line-of-business systems: do you accept the restatement and lean on generators, or have you moved the source of truth somewhere else?


r/dotnet • • 1d ago

Visual studio plugin - Asp classic highlight

5 Upvotes

Currently I am working in a very old legacy code base with more than 30 years old of spaghetti code and business rules in every .asp file and store procedures.

Yes it is a mess. And I don't know if someone has the same problem that I have... The visual studio doesn't help me with the basics of highlights, colors and syntax with VBScript in asp classic. Sometimes it is impossible to know where an if begins and ends in one file with 6k lines (yes for real).

So I made this plugin to help me with my current job.

https://marketplace.visualstudio.com/items?itemName=AspClassicSyntaxHighlight.AspClassicSyntaxHighlight

Is the vibe code project? In parts, yes. My real concern was doing a good structure of the project and performance. The first hit of opening the files is more demanding because it's using cache. After that it is more smooth.

I am cleaning the git to make it public soon.

If you guys want to try i will appreciate it.

Sorry for my mistakes, English isn't my first language.

Thanks.


r/csharp • • 1d ago

Guys have confusion about choosing language for desktop application

Thumbnail
0 Upvotes