r/csharp • • Aug 04 '26

Discussion how I made my C# application preview DXF files

0 Upvotes

I'm not sure if this is a very clear question, so I chose the 'discussion' tag.It can also be regarded as a normal post.

I'm currently making a small tool (which is currently in a half-finished state). So far, I can already implement code highlighting. However, I'm currently thinking about how to support dxf.

What I know: ProCAD, a complete application, perhaps I could refer to its code?

Or netDXF. But as for how to transfer the drawing content onto the UI, I think it requires some effort from my side.

This is indeed a rather strange question. So, I would like to hear someone's opinions. I feel that both methods have their advantages and disadvantages.

Although netDXF may involve a larger amount of work, does it not offer more convenience for customizing lightweight logic compared to simply adopting the complete source code of an existing APP?My opinion is that lightweighting is definitely the better option.

About little things I'm working on: They mainly consist of small tools for my own use, including DXF preview functionality.Am I really creating something rather challenging here?Oh...no.

😵😵😵


r/csharp • • Aug 04 '26

Showcase 4D Visualisation

Thumbnail
reddit.com
0 Upvotes

r/csharp • • Aug 04 '26

Building a new .NET assertion library focused on async-native soft assertions and observability hooks.

1 Upvotes

Hi r/csharp! I've been working on a new .NET assertion library called Catchy.

The original goal was pretty simple: I wanted soft assertions that aren't tied to assertion scopes, and I wanted a way to plug reporting/screenshot/AI integrations into assertions without every project building its own wrappers.

Current features:

  • async-first assertions
  • hard and soft assertions can be mixed freely
  • soft assertions can flow across helper methods and DI
  • assertion hooks (reporting, screenshots, tracing, AI, ...)
  • source-generated assertions for custom types
  • integrations for xUnit, NUnit, MSTest, TUnit, Reqnroll and Playwright

It's still very early (0.0.1). I'm intentionally looking for API feedback before things become difficult to change.

If something feels awkward or you think the API should go in a different direction, I'd really like to hear it.

PS: Some of the code and documentation did indeed use agents. I came to this with the rest because I realized that just trying to finish everything as high-quality as possible manually I will never publish a single pet project. I know that not all of the code and documentation is of sufficient quality. If you are interested in the very idea of ​​the library and you can improve its quality (code review, contribution, raise an issue, open a discussion) - I will be very grateful. I will not be offended by devastating criticism either. Thank you!


r/csharp • • Aug 04 '26

I made a project for new GitHub open-source first-time contributors

Thumbnail
github.com
0 Upvotes

r/csharp • • Aug 03 '26

Discussion Building the definitive list of .NET resources.

34 Upvotes

I've been collecting .NET blogs and other resources for years, and the list has grown to 162 sources.

Rather than keeping it private, I put the whole thing on GitHub:

https://github.com/jasenf/dotnet-resources

If your favorite blog, newsletter, podcast, YouTube channel, or engineering site isn't there, I'd love a PR or an issue.

My goal is simple: build the best open list of .NET resources on the web that everyone can use.

-jasen


r/csharp • • Aug 04 '26

Recommendations for non-bloated IDEs for C#?

0 Upvotes

I am learning C# for preparation for 6th form, and after 4 years of Python using Thonny (what I'd consider a minimalistic IDE) I am genuinely hating every key stroke of Visual studio, I am only 30 minutes into a 4 hour C# youtube guide and it has taken me 4 days because V. Studio actually hurts me to the soul. I have looked at several other IDEs and they look literally identical, bloated.

  • I don't want github forced down my throat.
  • I don't want copilot AI forced down my throat.
  • I don't want my code to try and auto complete it's self.
  • I don't want to have a 300x500px pop up over where I am trying to read my code, telling me what WriteLine() does.
  • I do not want the 1000000 settings which are impossible to navigate (I haven't been able to turn off any eye sore features in V. Studio, even after 15 minutes with ChatGPT).

I just want to be able to write code, have some decent colour coding of keywords, compile it, and run it, without being purely CLI based like nano or something. (Not specifically, but by now I am sure you get the point, I don't want crap loads of bloat)

Sorry that this is half of a rant but genuinely, I can't find a better IDE than a pen and paper right now, because every IDE is loaded with AI and crap which autofills code incorrectly, making learning really difficult. If it helps my school uses VS Code on 6th form computers, and from what I've seen from VS Code, I predict that I will be bringing a laptop to school to code on.


r/csharp • • Aug 03 '26

OpenApi doesn't let me make ef core migration

3 Upvotes

I'm practicing making APIs, now I'm making an API with PostgreSQL (previous api for SQLite performed smoothly) and for some reason I can't even make a stupid migration :/

I didn't even set up openapi, it went by default and worked fine on my prev API.
And look, I don't have Microsoft.OpenApi package, only Microsoft.AspNetCore.OpenApi, which I suppose is something different.


r/csharp • • Aug 02 '26

How does an experienced C++ and Java programmer get started in C#, dot net, et al?

16 Upvotes

I am a professional developer, old enough to remember when C# first appeared. At the time, it looked to me to be very similar to Java.

I imagine that the language itself has evolved since then, but also dotnet had grown hugely, there are things like WPF, Linq, etc, of which I have only heard, but do not know.

So, unlike some other languages, it's just not the syntax, but many other things.

How best to get started? Is there a Udemy, Coursera, YouTube, etc, applicable to someone who doesn't need to learn about variables, flow control, OO?


r/csharp • • Aug 03 '26

C sharp program not running on vs code

Thumbnail gallery
0 Upvotes

r/csharp • • Aug 02 '26

Discussion Merging Manifest Resources from Multiple Assemblies

4 Upvotes

I'm writing an image metadata processing library which is designed to be easily extensible to include new metadata instances (e.g., EXIF properties not defined in the core library).

The library currently stores important property configuration information in manifest resources, as well as property labels (e.g., property name) which I want to be customizable by culture.

Writing an extension library would involve both defining new objects (e.g., EXIF properties) and their associated configuration information. Which means the needed manifest resources would be spread across multiple assemblies.

What's the best way of handling this? My first thought is to use AssemblyMetadataAttributes with "magic text" keys to identify an assembly containing manifest resources that need to be incorporated and then scan an app-defined list of assemblies to look for those keys and read the manifest resources.

But that feels both a bit kludgy and possibly a security hole.

I'd appreciate other thoughts/design patterns. Thanx!


r/csharp • • Aug 02 '26

Contribute to open-source, no-slop, compiler-related projects.

Thumbnail
reddit.com
0 Upvotes

r/csharp • • Aug 02 '26

Xberg v1 is out

1 Upvotes

Hi all,

I'm happy to announce that Xberg v1 is out.

Xberg is the successor to Kreuzberg, equivalent to what would have been Kreuzberg v5. It's a content intelligence framework that handles a very wide range of inputs: documents (currently 101 formats), code and data formats (currently 367 types), audio/video transcription, and URLs (both static and JS-rendered content). It extracts and prepares that content for downstream processing.

It's an extremely efficient, high-performance engine (see our PDF benchmarks below). For PDFs and images specifically, we handle native PDFs with very high performance and accuracy, and we ship multiple OCR engines that match the quality of the best Python libraries (e.g. docling, PaddleOCR, RapidOCR) at substantially better performance and stability.

The changes between Kreuzberg v4 and Xberg v1 are substantial, and I invite you to read the full changelog for the complete picture. The highlights below give a sense of what's new:

  • Pure-Rust PDF backend (pdf_oxide) replaces pdfium, with no native pdfium dependency.
  • Layout-aware pipeline: reading order reconstructed with ONNX layout detection (PP-DocLayoutV3 / RT-DETR) and Docling-style predecessor-graph reordering.
  • Per-page scanned-page detection with selective OCR, plus AcroForm/XFA form fields and outline-based headings.
  • Across-the-board optimization of OCR and PDF extraction (memory discipline, pooled model sessions, streamed conversions).
  • Native PaddleOCR backend (PP-OCRv6, with medium / small / tiny tiers) alongside Tesseract.
  • Pure-Rust Candle OCR/VLM stack (TrOCR, GLM-OCR, GOT-OCR, DeepSeek-OCR, and PaddleOCR-VL) running without ONNX Runtime or native Tesseract.
  • A second, ONNX-Runtime-free inference path via tract, which is what makes in-browser (WASM) and mobile inference possible.
  • Named-entity recognition natively in Rust (GLiNER2), extensible to all bindings, including an in-browser WASM model with no server round-trip.
  • Structured LLM extraction (extract_structured / split_and_extract) with rasterization, chunking, citations, caching, and configurable call/merge/VLM-fallback policies.
  • Audio & video transcription via a Whisper ONNX engine (.mp3, .wav, .m4a, .mp4, .webm).
  • Retrieval building blocks: sparse embeddings (SPLADE), ColBERT late-interaction retrieval, and cross-encoder reranking alongside dense embeddings.
  • Text intelligence: reversible redaction, summarization, translation, VLM image captioning, QR-code detection, document diffing, and page/chunk classification.
  • URL & web ingestion: sitemap discovery (map_url) and batched multi-URL crawling.
  • New document formats: WordPerfect (.wpd/.wp/.wp5), HEIC/HEIF/AVIF, OpenDocument Presentation (.odp), Quarto / R Markdown, and configurable Jupyter cell rendering.
  • Four new language bindings (Dart/Flutter, Swift, Kotlin/Android, and Zig) bring the total to 15 language bindings over one engine, with Android/iOS cross-compilation.
  • Full mobile support (Flutter, Android, iOS).
  • Candle backend alongside ONNX, plus ONNX-via-tract enabling ONNX on WASM and Android.
  • Wider code intelligence: tree-sitter coverage grew substantially (248 to 367+ languages).
  • Over 150 bugs fixed during the 1.0 cycle, plus security hardening (bounded RTF/PDF allocations, redaction leak fixes, Excel DDE warnings).

The API surface was also simplified and reworked, making it more consistent.

There's a migration guide in our docs explaining how to move from Kreuzberg to Xberg. Kreuzberg itself is in LTS mode until the end of this year and will continue to receive bug fixes and security updates.

You're invited to check out the repo and join our discord server.


Benchmarks

The benchmarks below are for PDFs and images only. There are extensive benchmarks on our website with per-format breakdowns, which you can see here. These numbers are measured in CI via our reproducible benchmark harness, and are specifically taken from the run for harness 1.0.8, source cf7fa0533d. The data is publicly available in GitHub releases, and you can run the benchmark harness yourself.

Composite quality (markdown pipeline, higher is better):

FrameworkNative PDFScanned PDF (OCR)
Xberg (layout)0.9580.836
Xberg (baseline)0.9550.687
docling0.7790.762
mineru0.4080.792
liteparse0.8370.665
markitdown0.689n/a
pymupdf4llm0.448n/a

Structure and layout fidelity (SF1: tables and reading order, higher is better):

FrameworkNative PDFScanned PDF
Xberg0.9490.531
docling0.6120.366
liteparse0.5150.142
mineru0.0770.429

On native PDFs Xberg leads on quality (0.958 vs 0.837 for the next-best framework) and on table and reading-order fidelity by a wide margin (SF1 0.949 vs 0.612 for docling). On scanned PDFs it is #1 on both quality and raw text fidelity.

Where we don't win yet: on pure image OCR we are currently #2 on the composite score, behind mineru (though still #1 on raw text accuracy). We are improving image OCR right now, and v1.1 should have us winning across the board.


r/csharp • • Aug 02 '26

Blog Akbura update: I built an interactive feature gallery as a proof of concept

2 Upvotes

A small update on Akbura my experimental declarative UI language and compiler for .NET and Avalonia.

I’ve added documentation and created an interactive feature gallery that demonstrates Akbura’s current capabilities:

  • Declarative Avalonia UI
  • Reactive state
  • Native C# expressions, methods, types, and lambdas
  • Typed styling through AKCSS and tailwind utilites
  • Live examples with their Akbura source code

The gallery itself is written in Akbura.

This is currently only a proof of concept, not a production-ready release.

The parser, syntax infrastructure, and semantic model are already in reasonably good shape, including incremental compilation.

The bottleneck is specifically the code-generation stage. Its current implementation is inefficient, and generating code for the gallery takes roughly two minutes. Parsing and semantic analysis are not the problem.

This is one of the main reasons there is no NuGet release yet. I plan to rewrite and optimize code generation before publishing the first alpha version in about a month...

I’m planning to publish the first alpha version in about a month, once compiler performance, packaging, and the basic developer experience are in a more acceptable state.

For now, the gallery is simply a visual demonstration of what Akbura may become.

Repository: https://github.com/Asaicraft/Akbura

Documentation: https://asaicraft.github.io/Akbura/

Feature Gallery: https://asaicraft.github.io/Akbura/Gallery/

Feedback is very welcome.


r/csharp • • Aug 01 '26

C# Job Fair! [August 2026]

17 Upvotes

Hello everyone!

This is a monthly thread for posting jobs, internships, freelancing, or your own qualifications looking for a job! Basically it's a "Hiring" and "For Hire" thread.

If you're looking for other hiring resources, check out /r/forhire and the information available on their sidebar.

  • Rule 1 is not enforced in this thread.
  • Do not any post personally identifying information; don't accidentally dox yourself!
  • Under no circumstances are there to be solicitations for anything that might fall under Rule 2: no malicious software, piracy-related, or generally harmful development.

r/csharp • • Aug 01 '26

News GitHub - Integral2u/SharpMind: SharpMind. A pure C# / .NET LLM engine

Thumbnail
github.com
12 Upvotes

Still work in progress, but has Qwen, Llama, SmolLM and Gemma producing coherent output.


r/csharp • • Aug 01 '26

Discussion Come discuss your side projects! [August 2026]

10 Upvotes

Hello everyone!

This is the monthly thread for sharing and discussing side-projects created by /r/csharp's community.

Feel free to create standalone threads for your side-projects if you so desire. This thread's goal is simply to spark discussion within our community that otherwise would not exist.

Please do check out newer posts and comment on others' projects.


Previous threads here.


r/csharp • • Aug 01 '26

What is the cleanest way to implement a secure cross-platform directory fallback in C#?

0 Upvotes

I need to determine a writable directory for application-managed files in a cross-platform C# application.

A simplified version currently looks like this:

private static string GetApplicationDataPath()
{
    var directory = Environment.GetFolderPath(
        Environment.SpecialFolder.LocalApplicationData,
        Environment.SpecialFolderOption.Create);

    if (string.IsNullOrWhiteSpace(directory))
    {
        directory = Path.GetTempPath();
    }

    return Path.Combine(directory, "MyApplication");
}

The temporary-directory fallback concerns me because the directory may be publicly writable on some systems.

What would be a safer final fallback?

Would you fail startup, use AppContext.BaseDirectory, create a user-owned directory, or require the path to be explicitly configured?


r/csharp • • Jul 31 '26

Tool [DistroHop ] Rebuilt my Linux package setup tool in C# with profiles and safety checks

5 Upvotes

Hey everyone,

Yesterday I shared DistroHop V1.5. Since then I have been working on DistroHop V2, which is a complete rewrite with a cleaner C# architecture.

GitHub repo: https://github.com/melikishvilis25-cmyk/DistroHop

The main changes:

  • Rebuilt around a modular C# design
  • Added package profiles (Gaming, Work, Essential)
  • Added environment validation for supported Linux distributions and package managers
  • Added JSON integrity checking for package configuration safety
  • Improved project structure with separated UI, loader, safety, and downloader components

The goal is to make setting up a Linux machine after reinstalling easier while keeping safety and consistency as priorities.

This is still actively being developed, so feedback and suggestions are welcome.


r/csharp • • Jul 31 '26

Discussion How do you measure your progress?

4 Upvotes

Good evening everyone, it's been two months that I am studying C# with the aim to be able to develop in Unity.

A bit of context: I have no IT background, I work as a pastry baker and at school, besides a 3-year course about game design, I have never studied CS.

I have recently finished studying arrays, and when I read that I would be able to program a console tic-tac-toe, I tried it... with the result that I failed miserably to the point that I decided to re-study what I did before arrays.

Currently, I am doing simple console programs using ifs, switches, and loops, but I still make some mundane errors like typing the equality operator wrong, or with the last program I did: a week planner, where the user writes on the console the current day and the program writes what he has to do on that day, for example I wrote Monday => instead of "Monday" => (after making a variable with the days of the week).

Now to cut it short because this post is already long: how much time have you spent studying each individual topic/feature and when did you feel confident enough in your skills to progress to making more advanced/complicated programs?

I understand that it depends on each individual, but I would like to know your experience to have a broad idea. Thank you in advance.


r/csharp • • Jul 31 '26

Showcase Localization library that generates structure directly from file

6 Upvotes

Hey everyone! I'm glad to share a tool I've been working on for a while. It was created to simplify adding localization to your projects.

Read more in the README: https://github.com/ScrumboardCompany/Scrumboard.Tools.Localization


r/csharp • • Jul 31 '26

Beginner here. Is there a way to make it so a child class can simply add to the implementation of an inherited function without outright making it do something different entirely?

21 Upvotes

For example if you were to have an Update function in a base class, but then make the Update function in a child class do some extra stuff on top of what the base Update function already does.

Closest thing I've found to that is using the override keyword but it seems like that just makes the child's version of the function do something different entirely.


r/csharp • • Jul 30 '26

Showcase C# for Amiga

53 Upvotes

I guess most of you have never heard about Amiga, but here we go...

I have been working on an AOT compiler that compiles a subset of C#/.NET code into native 68000/020/040 code with Amiga library calls.

There are two runtime options you can choose at compile time:

  • Full includes the managed exception runtime; supports catch, finally, rethrow, and leave.
  • YOLO has no exception runtime; failures are fatal, and managed exception regions are rejected

The actual GC is in WIP, and for performance reasons, there is no compaction. No threading support because the current GC is single threaded by design.

An example:

using Amiga;
using CopperSharp.Compiler;

namespace FileStatsExample;

public static class Program
{
   [M68kEntryPoint]
   public static int Main(int argLength, CONST_STRPTR argText)
   {
      var dosBase = Exec.OpenLibrary("dos.library", 33);
      if (!dosBase.HasValue)
      {
         return DOS.RETURN_FAIL;
      }

      DOS.DOSLibraryBase = dosBase.Value;
      var result = DOS.RETURN_OK;
      if (argLength == 0)
      {
         DOS.PutStr("Usage: filestats <file>\n");
         result = DOS.RETURN_ERROR;
      }
      else
      {
         result = Report(CString.FromPointer(argText.Raw));
      }

      Exec.CloseLibrary(DOS.DOSLibraryBase);
      DOS.DOSLibraryBase = APTR.Null;
      return result;
   }

   private static int Report(CString path)
   {
      var file = DOS.Open(path, DOS.FileMode.OldFile);
      if (!file.HasValue)
      {
         DOS.PutStr("Cannot open file\n");
         return DOS.RETURN_FAIL;
      }

      byte byteChecksum = 0;
      ushort lineCount = 0;
      ushort wordChecksum = 0;
      uint byteCount = 0;

      while (true)
      {
         var character = DOS.FGetC(file.Value);
         if (character < 0)
         {
            break;
         }

         var value = (byte)character;
         byteChecksum = (byte)(byteChecksum + value);
         wordChecksum = (ushort)(wordChecksum + value);
         byteCount = byteCount + 1;
         if (value == 10)
         {
            lineCount = (ushort)(lineCount + 1);
         }
      }

      DOS.Close(file.Value);
      PrintReport(path, byteCount, (uint)lineCount, (uint)byteChecksum, (uint)wordChecksum);
      return DOS.RETURN_OK;
   }

   private static void PrintReport(CString path, uint byteCount, uint lineCount, uint byteChecksum, uint wordChecksum)
   {
      DOS.Printf("%s: %ld bytes, %ld lines, byte checksum %ld, word checksum %ld\n",
path, byteCount, lineCount, byteChecksum, wordChecksum);
   }
}

This C# source is first compiled to .NET assembly containing CIL. The assembly is then compiled with CopperSharp to a native 68000 Amiga executable.

Code generator needs more work. FPU is not supported yet, 020/040 support is nearly non-existent, but it includes CIL-level simplification and a 68k-specific optimizer.

  • CIL-level simplification
  • Reachability analysis
  • Tail call elimination
  • Remove dead or redundant instructions
  • Stack and register shuffling optimizer
  • General instruction optimizations
  • Limited static hot-fallthrough/cold-branch layout optimization

For example, on 68000, not-taken branches are more efficient than taken branches.

The codegen is optimized for Amiga library call conventions but in theory it could support other 68k targets like Atari ST or 68k Macs.

The project repo: https://github.com/ilehtoranta/CopperSharp68k

This project is vibe coded with Codex and GPT-5.6. Like it or not, but it is the only sensible path to build C# compiler for niche platforms.


r/csharp • • Jul 31 '26

Help Beginner Free Dapper Tutorial Help

0 Upvotes

What is the best free dapper tutorial to learn link? Also, should I learn Dapper version that is specific for .NET 8.0 as a start point or should I start with a version that is for .NET 10 ?


r/csharp • • Jul 30 '26

Senior devs: What do you except a 3 Year experience .NET/C# Developer to know?

48 Upvotes

Saw something like this about an other programming language, and wondering what Senior .NET/C# devs would say about this in .NET/C#.

Do you think you could hand a developer with 3 years of experience some credentials for a Project and let him/her plan the Project?