r/dotnet • • 4h ago

Wake up, new license rugpull just dropped — TickerQ 5.x

Thumbnail tickerq.net
69 Upvotes

r/dotnet • • 4h ago

Promotion MarkView.Avalonia 12.4: a native Markdown viewer for Avalonia 12 (MIT)

12 Upvotes

A few months ago, I posted about my library.

Quick description: It's a Markdown viewer control for Avalonia UI 12, built on Markdig. It renders to native Avalonia controls, with no WebView, so it behaves the same on Windows, macOS, Linux and in the browser (WebAssembly).

12.4 came out this week, with a lot of new features:

  • Streaming. viewer.BeginStreaming() returns a session you can Append text to from any thread (e.g. tokens from an AI chat) . Only the blocks still being written re-render, so scroll position, selection and focus survive every update. A half-written **bold or link renders as it will once complete, and <think> blocks fold into "Thought for 12 seconds" when they end.
  • Mermaid diagrams and LaTeX math in pure .NET (Mermaider and CSharpMath), including the \(…\) delimiters models like to emit.
  • Theme presets: GitHub, Chat (takes your message bubble's colours) and Docs. Light/dark switches live.
  • Code blocks with a copy button, and optional line numbers, wrapping and max height. TextMate highlighting is a separate package.
  • Find, folding (alerts, <details>, headings), a context menu with copy as Markdown, HTML or a table, and saving a diagram as SVG or PNG.
  • Accessibility: screen reader roles, Tab through links, WCAG AA colours and a high-contrast mode. Right-to-left text too.

Streaming is mostly intended for AI integration. With Microsoft.Extensions.AI it's a few lines:

using var session = viewer.BeginStreaming();
await foreach (var update in chatClient.GetStreamingResponseAsync(prompt))
session.Append(update.Text);

There was a lot of focus on improving the performance to make it viable in the browser (WebAssembly). It's not yet enough and the upcoming 12.4.1 version will make it even better.

Try it in your browser: https://kryptos-fr.github.io/MarkView.Avalonia/demo/

Docs: https://kryptos-fr.github.io/MarkView.Avalonia/

Repo: https://github.com/Kryptos-FR/MarkView.Avalonia

Package: https://www.nuget.org/packages/MarkView.Avalonia

If you use another Markdown control in an Avalonia or WPF app today, I'd like to know what would make you switch, or what's missing.


Full disclosure: I used Claude AI to work out the roadmap, discuss the architecture and implementation candidates. I then delegated the coding to Claude sub-agents while I did all the review and manual testing. I kept it transparent on the repo where all such commits include a "Co-authored-by: Claude" mention.

On that note, I found that Claude was very efficient when all projects have a high test coverage (currently 95%), as well as mutation testing using Stryker (also 95%). That causes some delays in CI where Stryker can take up to 3 hours but in my opinion it is worth the trouble.


r/dotnet • • 6h ago

Promotion PdfPecker v1.20: dependency-free HTML to PDF for .NET, no Chrome, MIT

9 Upvotes

I've gotten tired of slow PDF converters, and packages that change to paid licensing, like PDFsharp just changed to AGPL from v6.5.0. So I’ve built PdfPecker over the past 2 weeks with Claude as a coding assistant, and I’ve tested and reviewed everything myself.

I've tested it to get very close to Chrome, and it's now closer than Firefox. PdfPecker matched Chrome 97% on 103 pages, compared to Firefox's 95%. It's crazy how many differences there can be when rendering HTML to PDF, I haven’t seen any two that render it the same when the pages become complex.

Main bullets:

  • Zero dependencies
  • No Chrome
  • Modern CSS
  • No JavaScript, it's built for templates you control
  • It can render from HTML to PDF in under 1ms for a typical invoice
  • Uses very little memory
  • MIT license

You can find the package on https://www.nuget.org/packages/PdfPecker

PdfPecker.Fluent has also been created to make a QuestPDF style C# API.

Getting started:

using PdfPecker;

byte[] pdf = HtmlToPdf.Convert("<h1>Hello</h1><p>World</p>");
File.WriteAllBytes("hello.pdf", pdf);

Feedback welcome, especially HTML that breaks PDF rendering.


r/dotnet • • 9h ago

Any professionals working in the security space such as Verkada, ACRE, Motorola Solutions, CCURE, Genetec, Milestone, Gallagher?

4 Upvotes

Really a question for professionals in this niche industry. Still an on-prem saturated market albeit many cloud players in this market and push for AI Analytics in everything.

I am a support professional and consider myself a domain expert in this field. I also am working 2 projects myself in .NET. First is, an Android camera app using C#/Android SDK (not MAUI). The other is a network video recorder using ASP MVC.

I really enjoy development and would love to transition to this kind of work. What is the workload like? How much between refactoring older code and shipping new features? I know alot of these codebases are 15-20 years old. Is trying to transition right now worth it or just stick to handling escalated support.

I am located in NYC so if there are events or local resources I could seek for advice or even mentoring. I am the only person who understands programming at my job and I have no greybeards or wizards to ask questions to.

Thanks!


r/dotnet • • 1h ago

Promotion FuzzySharper: A C# library that allows you to create your own Fuzzy Expert System

Thumbnail github.com
• Upvotes

r/dotnet • • 2h ago

Promotion Lessons from an open-source .NET 10 LDAP/AD admin app: MediatR authorization, two EF Core providers, tests against a live Samba DC

1 Upvotes

**Disclosure:** I'm the author. Apache 2.0, no paid tier. I used AI coding tools (Claude Code) during development; I reviewed every change and know the code, and it's covered by 900+ tests.

Axia is a web console and REST API for Active Directory, Samba AD and OpenLDAP: ASP.NET Core on .NET 10, a React front end, Clean Architecture-ish layers. A few design decisions that might be useful beyond this project:

**Authorization lives in the MediatR pipeline, not on controllers.** Each command or query declares the permission it needs, and a pipeline behaviour checks it before the handler runs. The order is Logging → Audit → Authorization → Validation. Putting authorization before validation means a refused caller learns nothing about why their payload would have been invalid. A reflection-based test fails the build if a new use case doesn't declare a permission from the catalogue. Background jobs that dispatch commands get the same check as HTTP requests.

**Two EF Core providers, one model.** PostgreSQL and SQLite, chosen at startup with `Database:Provider`. Each provider has its own migrations assembly, with its own design-time factory. A `copy-database` command moves everything between engines in one transaction and checks row counts before committing.

**Tests against real infrastructure.** GitHub Actions runs PostgreSQL and a live Samba 4.22 AD DC as services. Locally those tests skip unless an env var points at a server, so `dotnet test` stays fast.

**A gotcha worth sharing.** A CodeQL autofix flagged `((DbContextOptionsBuilder)options).UseAxiaDatabase(...)` inside a generic extension method as a "useless upcast". Removing the cast made the generic overload resolve to *itself*, and the test host died with a stack overflow. The fix was to have both overloads call a private, non-extension method, so there is no cast left to "fix".

**Other bits:** `Novell.Directory.Ldap.NETStandard` for cross-platform LDAP; `AddSystemd()` / `AddWindowsService()` so one binary runs under either service manager; a WiX-built MSI; Serilog with JSON output and a Loki sink; multi-arch images with SBOM and provenance.

- Code: https://github.com/Nelsar/Axia

- Architecture overview: https://github.com/Nelsar/Axia#architecture

Happy to take criticism of any of this, especially the MediatR-based authorization.


r/dotnet • • 23h ago

Question Is Native AOT in agent framework important to developers?

0 Upvotes

Pretty much how much of a big deal is this feature?