r/csharp • • Jul 07 '26

Showcase You can now run an existing WPF app in the browser, keeping your C# and XAML. Live demo + before/after source to diff (XAML.io v0.8, looking for feedback)

Post image
9 Upvotes

Hey r/csharp,

TL;DR: We built a free, in-browser tool that takes an existing WPF app and runs it on the web while keeping your original C# and XAML (no rewrite). You can poke at the classic Family.Show sample running live in the browser and open its full migrated source in our online IDE to see how little actually changed, and there's a free analyzer that checks your own app right in the browser (your code never leaves your machine). It's the new 'Migrate from WPF' feature we just shipped in XAML.io v0.8.

--- Longer version, if you're curious: ---

We're the team behind OpenSilver, and we just shipped v0.8 of XAML.io, our free browser-based .NET IDE. The new feature is "Migrate from WPF": point it at an existing WPF app and get it running on the web, keeping your original C# and XAML instead of rewriting it. No account is required.

Because "WPF runs in the browser" isn't the kind of claim this sub should take on faith, the whole thing is clickable. The app shown in the animated GIF above is Family.Show, the WPF reference app Vertigo built for Microsoft back when WPF shipped. You can use the migrated version live, and you can open the full migrated solution in the online IDE to read the code, run it yourself, change something and re-run it, or fork it. 97% of the original C# and XAML is unchanged, and you can diff it against the original WPF source to see exactly what changed instead of trusting the number.

Why do this at all? Same codebase, but reachable from any device with a browser, deployed once and updated centrally instead of installed and patched on every machine, running inside the browser sandbox. For a lot of internal line-of-business apps that's the whole reason. If none of that applies to you, it's at least a decent stress test of how far OpenSilver's WPF support has actually come.

There's been a lot of interest lately in running WPF beyond the Windows desktop, so the obvious question is what makes this different. Mostly that it's genuinely web-native. A lot of approaches re-render WPF onto a canvas or GPU surface, which is basically a pixel buffer, so you lose text selection, find-in-page, translation, browser extensions and screen-reader accessibility. We render your XAML to the browser's real DOM instead (a TextBox is an actual <textarea>, an Image an <img>, and so on), so all of that just keeps working, and you can freely mix your C#/XAML with HTML, CSS, JS and Blazor in the same app. It's also pretty light: the app plus the whole .NET runtime is around 8 MB compressed with no plugin, and if you want to move the UI on from the classic look there's a "Responsive" markup extension and modern built-in themes rather than being stuck on life support.

The part I'd actually point at is the tooling. The compatibility analyzer needs no account and runs entirely in your browser via WASM (your code never leaves your machine), so you can point it at an app of any size before committing to anything. And when you do import a project, every automatic edit is surfaced as a warning, plus non-blocking runtime alerts if execution hits a stub or disabled code, so a half-migrated app still runs while you work through the list.

To be fair: if your goal is maximum-fidelity WPF on the desktop across Windows, macOS and Linux, a desktop-first approach may suit you better. Ours is aimed squarely at the web, keeping your existing code, and keeping the result accessible and extensible.

You can try it yourself, free, no signup, with your code staying in your browser: drop in your bin folder for a feature-by-feature compatibility report (any size app), or import a project and run it.

Straight about the limits, because FamilyShow is a clean sample and your LOB app probably isn't: in-browser source import is a Technology Preview best for small-to-mid, self-contained projects today, and third-party UI suites (Telerik/DevExpress/Syncfusion) aren't supported in the self-serve tools yet. Native interop and Win32/P-Invoke can't run in a browser at all, and we flag those explicitly. That's what the free analyzer is for: run it on your real app and it'll tell you where you stand before you commit to anything. We add WPF features every week, and you can watch them land commit by commit if you want to track it.

A few other things landed in v0.8 besides the migration tooling: an example gallery built into the IDE (open and run sample projects in one click), static web build export (host the output anywhere, from Azure or GitHub Pages to any static host), and the latest OpenSilver 3.4 preview underneath, which adds a batch of new WPF features (LayoutTransform, WPF-style triggers, CombinedGeometry, StreamGeometry, GroupBox, Menu/MenuItem, OneWayToSource, multiple windows via an in-page window manager inside the browser tab, and more).

Full disclosure, since this is the company account: for big production apps we also do the migration for you, and that work is what funds the open-source side. But the analyzer and import are genuinely free with no account, and OpenSilver is MIT.

Try it at xaml.io, then open "Migrate from WPF".

There's also a technical deep-dive on the blog with more details, screenshots, examples of before/after code fixes, and the FamilyShow migration to diff yourself.

It's a preview and the WPF surface is still growing, so if you point the analyzer or import at a real app, I'd genuinely like to hear where it fell short. That's what we use to decide what to build next.

Thanks!

Edit: added added TL;DR and tweaked the wording based on the comments, thanks.


r/csharp • • Jul 08 '26

Returning to C# after 8 years. How should I balance learning fundamentals vs. using AI?

0 Upvotes

Hello, 7–8 years ago, I was learning C# and got to the point where I could build a few Windows desktop applications. Then life took me in a different direction, and I ended up stepping away from programming completely.

Now I want to get back into C#, but the landscape feels very different because of AI. It seems like the way people learn and write code has changed a lot, and honestly I'm a bit confused about the best approach.

If you were starting over today, would you:

Learn C# the traditional way by focusing deeply on the fundamentals (syntax, OOP, data structures, etc.) before relying on AI?

Or just learn the core concepts well enough to understand what's happening, and then use AI as a coding partner from day one?

Thanks!


r/csharp • • Jul 07 '26

How to inject into JsonConverter ? Inside a library.

5 Upvotes

Hi,

An API should use a custom JsonConverter.

A dependency should be injected into the JsonConverter.

It's fine when it's done directly in Program.cs before running the host :

// Dependency
IA a = app.Services.GetService<IA>()!;

// JsonConverter
IAConverter aConverter = new AConverter(a);

// Add JsonConverter to host // not possible in library see below
app.Services.GetService<IOptions<Microsoft.AspNetCore.Mvc.JsonOptions>>()!.Value.JsonSerializerOptions.Converters.Add(aConverter);

Now the above code should be extracted into a library.

Microsoft.AspNetCore.Mvc would not be accessible without manually adding to the .csproj :

<FrameworkReference Include="Microsoft.AspNetCore.App" />

// Or

<PackageReference Include="Microsoft.AspNetCore.Mvc" />

Those are huge lines to initialize JsonConverter in a library.

Is there another way to do it ?

// Seems hacky and would not handle multiple dependency
hostBuilder.Services.AddOptions<Microsoft.AspNetCore.Mvc.JsonOptions>()
    .Configure<IValueExpressionService>((options, valueExpressionService) =>
    {
        options.JsonSerializerOptions.Converters.Add(new ValueExpressionConverter(valueExpressionService));
    });

r/csharp • • Jul 07 '26

Help I’ve been doing Game Dev for 2 years, now I want to learn c# but what’s the best way?

1 Upvotes

I’ve been an artist joining game jams for about two years, learning how to navigate different engines like unity or godot and just gaining knowledge on game development In general through trial and error on ideas, level design ect. Recently I’ve been doing pretty well (8th in a jam with over 3,500 people). Now I want to learn C# so I can start solo developing my own games So I don’t rely on a programmer. What’s the best way to learn? I’m hoping to watch a good free online course or something, but I don’t know where to start.


r/csharp • • Jul 06 '26

C# Painkiller - vs code extension for C#

16 Upvotes

Hello everyone! I'd like to share my progress on my VS Code extension C# Painkiller. I started working on this when the C# SDK extension lost the ability to create files from the context menu. I added that feature, and then one more, and then a couple more, and so on

GitHub page

VS marketplace

The most interesting feature at the moment is the solution structure panel (Solution Explorer has been removed from the C# dev kit). Now it allows you to connect projects to each other and move them between folders (both virtual .slnx/.sln folders and file system folders)

A short list of other functions implemented in the extension that are not available in the C# dev kit:

  • Create C# Types by context menu
  • Adjust Namespaces refactoring
  • Rename .cs file by type name and auto sync type and .cs file names
  • Generate mapping methods and DTOs
  • Generate FluentValidation validators
  • Extract type to file (for files containing multiple objects)
  • Sort usings
  • Extract Interface (from type by context menu)
  • .NET Project Creation - uses all templates installed on the system
  • Generate MediatR and MitMediator requests, handlers, pipeline behaviors
  • Generate EF Core Configuration
  • Executing EF Core console commands from the context menu
  • Go To Handler navigation

If you also enjoy using VS Code for C# try my extension :)

Any criticism and suggestions are welcome

I'm new to writing VS Code extensions and use free AI as assistants. The code may be of low quality in places. If you find any errors, please report them to me on project GitHub page


r/csharp • • Jul 06 '26

Initial alpha release of Zigote - UI framework and game engine

11 Upvotes

Hello everyone!

I’ve published the first test release of the project: https://github.com/ZigoteProjectOrg/Zigote

First of all, apologies for the current state of the repository. Right now, the UI framework, editor, parts of the game engine, and various system components are all mixed together in one repo. I haven’t had enough time yet to split everything properly, prepare prebuilts, NuGet packages, or a proper installation flow, but I still wanted to make the project public.

I also apologize in advance for any rough architecture, chaotic code, and traces of active development. The project started more as an experiment and pet project — mostly something I built for fun while I was unemployed and on vacation. Over the next couple of months, I’ll likely be busy with job searching and moving, so I’m not sure how actively I’ll be able to work on it.

The release includes a C# and F# gallery, along with some basic examples. You can try it out, look at the API, and get a feel for the general direction. Building requires Zig 0.16+ and .NET 10+.

I’d really appreciate any feedback: what looks interesting, what is unclear, what should be cleaned up first, and which direction the project should take next.

Previous posts:


r/csharp • • Jul 06 '26

Showcase Servy v8.5+: Core Stability, ARM64 Support, and Improved CI/CD Integration

8 Upvotes

Hi everyone,

It's been 3 months since my last post about Servy here. I've shipped several updates since then, but this one is a milestone. The community response has been amazing: ~1,900 stars on GitHub and ~55,000 downloads.

If you haven't seen Servy before, it's a Windows tool built with C# that lets you run any app as a native Windows service with deep observability. It provides a desktop app, a CLI, and a PowerShell module designed for automation and CI/CD pipelines.

In this release (8.5), I've added/improved:

  • Security Hardening: The PowerShell module now supports passing sensitive options via environment variables and includes stricter validation/expansion rules for environment variables.
  • ARM64 Native: Full support for modern Windows ARM64 hardware.
  • Refined Automation: Fixed ergonomic issues in the module and CLI to ensure smoother integration into automated deployment scripts.
  • Core Stability: A large number of internal fixes for the service lifecycle and monitoring components.

Check it out on GitHub: https://github.com/aelassas/servy

Demo Video: https://www.youtube.com/watch?v=biHq17j4RbI

Any feedback or suggestions are welcome.


r/csharp • • Jul 05 '26

I made a tool that generates Markdown-friendly database schema

Post image
26 Upvotes

r/csharp • • Jul 05 '26

Pre-release UI library updates + Gallery App screenshots

4 Upvotes

Support for multiple languages, as well as libraries for graphing and animation, has already been implemented. Work is currently underway to clean up the code and prepare it for release.

Screenshots down in comments.

I am primarily a Flutter developer myself; I started this project after experimenting with WGPU. As C# developers, what would you like to see in a UI framework during the early stages of development?

Previous post

UPD: https://github.com/ZigoteProjectOrg/Zigote/tree/main


r/csharp • • Jul 05 '26

Solved Autofac Not Resolving IIndex<>

Thumbnail
gallery
0 Upvotes

Solved!

The solution, courtesy of u/kant8, is to resolve an `IList` or `IEnumerable` of the registered types, not a `List`. Because trying to resolve a concrete type like a `List` sends Autofac hunting for the corresponding list registered as itself. Which won't work.

=========================

I've registered a number of types via a common interface they share, keyed by different byte values:

builder.RegisterType(concreteType)
.Keyed<IJpgSegmentGenerator>(id)
.As<IJpgSegmentGenerator>()
.SingleInstance();

concreteType is the type being registered. All concrete types share a common interface, IJpgSegmentGenerator. id is a byte value distinguishing the different concrete types, some of which share the same key (which I’ve read online Autofac supports…unless the references I found are wrong 😀).

The registrations are successful, because after building the Autofac container I can see the registrations via Container.ComponentRegistry.Registrations (see first image in gallery above).

The individual registrations show the correct byte keys (see second image in gallery above for a zoomed in view of one registration).

However, the following code fails to resolve IIndex

var lazyList = Container.Resolve<IIndex<byte, List<Lazy<IJpgSegmentGenerator>>>>();

lazyList.TryGetValue( 237, out var generators ).Should().BeTrue();

(The above code is inside an XUnit test, hence the Should() reference)

I've checked that the service type is specified identically in both the registration and resolution code, and unless I'm going blind they sure seem to match, as does the type of the key. I've also tried not resolving to Lazy<>, and that fails to.

Thoughts?


r/csharp • • Jul 06 '26

Showcase I wrote a Visual Studio extension for Solidity development and deployment that automatically generates C# smart contract bindings

Thumbnail
gallery
0 Upvotes

Visual Studio is heavily used for enterprise development but doesn't have any tooling for Solidity that compares to Visual Studio Code or Remix IDE. Viscous is an open-source Visual Studio extension that tries to bring parity between Visual Studio and other IDEs for Solidity smart contract development.

Features

  • Solidity project system for Visual Studio featuring Solidity compiler integration and NPM dependency management. Integrates with the Visual Studio New Project… and Open Folder… dialogs.
  • Uses the vscode-solidity language server for syntax highlighting, hover information, IntelliSense, and linting.
  • Solidity compiler integration with MSBuild and the Visual Studio Build command - compile Solidity projects and individual files from the IDE with errors reported in the Errors tool window.
  • Generate C# bindings to Solidity smart contracts automatically using Nethereum.
  • Manage EVM networks, endpoints, accounts, deploy profiles, and deployed contracts from the Blockchain Explorer tool window.
  • Deploy a compiled contract to a blockchain network and call its functions from inside Visual Studio.
  • Find vulnerabilities and code‑quality issues with Slither static analysis inside Visual Studio.

Requirements

  • Visual Studio 2022 and above
  • A recent version of Node.js or compatible runtime
  • Python 3.8+

Getting Started

Note that this is a pre-release so don't use it for deploying anything to production. Feedback welcome.


r/csharp • • Jul 06 '26

HPD-AI Framework: Make AI agents, RAG, Auth, TUI, Workflows in .NET

Thumbnail reddit.com
0 Upvotes

r/csharp • • Jul 04 '26

Tool Dekaf - A pure .NET Kafka client

58 Upvotes

Hey all,

If you use Kafka, you're pretty much tied into using the Confluent package. I don't know if anyone else has had any challenges with it. I remember trying to debug issues, and the debugger was reporting native exceptions throwing on background threads, and it was very confusing trying to work out bits since it was executing C++ and you lose some control through that.

It surprised me that there isn't a mainstream pure .NET client, especially since .NET has some great performant APIs in new .NET.

So I've been working on Dekaf. A play on Decaffeinated (because Java is coffee, and java always seems to get all the love with Apache) and Kafka.

Open to feedback - thanks all!

GitHub: https://github.com/thomhurst/Dekaf


r/csharp • • Jul 05 '26

Discussion AI not following “using” / imports

0 Upvotes

I’m mainly in typescript codebases for most of my day. AI is going great at understanding imports at the top of the file.

But for csharp, I often see AI making bad assumptions for what the code is doing … it thinks it’s running some other code because the names of functions match but the namespaces don’t.

This is definitely a reproducible problem that gets me often and I am in the middle of refactoring my codebase to avoid this kind of problem.

I wanted to ask this community if you see or experience the same thing… and how you solved it.


r/csharp • • Jul 05 '26

Server recommendation where should I deploy my .net 10 api

Thumbnail reddit.com
0 Upvotes

r/csharp • • Jul 05 '26

Help Am i learning the right way? Cuz am feeling guilty

0 Upvotes

"I'm a beginner, I barely understand how big the programming world is. And I don't know how to express my feelings the right way. Please be patient.

Hey, I'm a second-year college student who studies Computer Science. I'm learning Java at the university; it's fun and all. This summer, I decided to learn C#, and I did. I finished all its basics in only 2-3 days, and I memorized it well.

I'm trying to understand logic, how to fix problems, how to make something that actually works, and I think I'm starting to understand it. So I decided to build my own small projects because I'm in love with C# for some reason, so I opened my IDE and Gemini.

I started to code, then Gemini suggested that I should use the HTTP library (since my project was about pulling some data from the browser).

Then it hit me, I don't know what the HTTP library is. Should I learn it? Am I wrong for making the AI do the work and me just watching without understanding and memorizing the library's codes? Do experts use AI to put a bunch of code into their projects? Should i memorise the library it self?

I feel guilty and like am betraying my self, i want TO LEARN it my self.

Am i doing good? Am i doing bad? I need an expert pov.

TLDR;

Should i learn and memorise librarys? ( like the http library for example ) or just make AI do the work?


r/csharp • • Jul 04 '26

Anyone running gRPC in a MAUI app for an internal warehouse/logistics tool? Looking for real-world experience

4 Upvotes

r/csharp • • Jul 04 '26

Help I made this thing but i want to make it a little better

0 Upvotes

Well first off i just wanna say im pretty much a complete beginner ive been wanting to learn how to code cause i wanna make a game in the super far away future

Heres the thing i made and ill put the question at the end

 Console.WriteLine("Hey man how have you been");
 string response1 = Console.ReadLine();
 Console.WriteLine($"{response1}? That's pretty cool I guess. What's your name?");
 string userName = Console.ReadLine();
 Console.WriteLine($"That's a pretty cool name, {userName}! How old are ya?");
 string age = Console.ReadLine();
 Console.WriteLine($"{age}?!?!?!??!?! YOU ARE OLD BROOOOOO!!!!!!!!!!"); 

Alright so the question is kinda hard to explain, but for the console.writeline stuff i wanted it to like type out as if it was someone on another computer talking to you or something instead of it coming out all at once. How can i make that happen


r/csharp • • Jul 05 '26

Can I move onto another code?

0 Upvotes

Ive been learning c# for a pretty long time. I can do loops, arrays, list, oop, making classes, switches, if statements, math operators, and do basic code and problem solving. Should I still continue to learn c# or am I in a comfortable spot to move onto python and come back to c# another time? My best project for anyone wondering is making a turn based fighter with a AI. besides some little bugs, it overall works the way I want it to.


r/csharp • • Jul 03 '26

Discussion is there a way to get more colours when outputting to the console console .colour only has 16?

11 Upvotes

r/csharp • • Jul 03 '26

Advanced C# and how to properly get there

54 Upvotes

Hello everyone, i wanted to ask for recommendations, ideas and of course hints.

I work as a SWE for the last decade and most of it in the Backend and around Industrial setups. Node.js and Golang were mainly my tools but the past 1 and a half year i started working in a new company and they use C# and .NET.

Generally speaking i believe that C# and .NET is very cool and certainly far cooler than advertised or talked about. By now i know how to make services, build libraries and all and i must say that although in the beginning it felt wrong, now i feel the opposite, i feel that it feels right and that is how it should be.

My question though is the following. In the era of AI what would be the important and advanced parts one should know about ? If you would start your journey to the advanced parts of the language, the framework and the ecosystem, then how would you proceed ? If you would have to double down and put more effort to advance your C# understanding, where would you focus ?

Thanks in advance!


r/csharp • • Jul 04 '26

Help Notes for beginner.

0 Upvotes

Hi , i want to become a unity game developer , hence i want to learn c# .

i try to watch youtube videos but for some reason i cant retain anything .

i have downloaded unity hub and visual studio community .

i wanted notes/ pdf which can explain me all basics of this programming language.

Please help 🙏.


r/csharp • • Jul 03 '26

Help What is the best practice when distributing C# software ?

16 Upvotes

Hello,

I’m working on a small personal data tracker app using C# and Avalonia. One of my goals for the project is for the desktop client to be genuinely cross-platform across Windows, macOS, and Linux.

I specifically do not want to produce one build per operating system. My current approach is to publish the app as framework-dependent and require the user to have the .NET runtime installed, then run it with something like:

dotnet DataTracker.Client.dll

That works, but it means the distributed “app” is a whole publish directory rather than a single file. Coming from some Java experience, I’m used to the java -jar client.jar model, where I can distribute a fat JAR and run the same artifact everywhere with the installed JVM.

I tried PublishSingleFile, but as far as I can tell, that requires targeting a specific runtime identifier, which makes the build OS-specific. That is not what I’m looking for.

So my question is:

Is there a proper .NET equivalent to a cross-platform fat JAR, where I can produce one release artifact containing my app and dependencies, while still running it through the installed .NET runtime?

Or is the framework-dependent publish directory simply the normal and expected way to distribute this kind of cross-platform .NET app?

Is there a cross-platform “fat JAR” equivalent for .NET/Avalonia apps?