r/moderndotnet

▲ 9 r/moderndotnet+1 crossposts

How are you handling automated dependency/security remediation across multiple .NET repos?

I’m working with an environment that has a large number of .NET repositories, and we regularly get dependency issues such as:

  • Outdated NuGet packages
  • Security vulnerabilities reported by Mend
  • Vulnerabilities in transitive dependencies
  • A newer package version potentially causing breaking changes
  • The same vulnerable package affecting many different repositories

The manual process can become quite repetitive:

Mend finding → identify dependency path → find a safe version → update .csproj/Directory.Packages.props → restore → build → run tests → rescan → create PR

I know tools like Mend Remediate, Renovate, Dependabot, and Snyk can automate parts of this, so I'm interested in how teams are actually handling this in real-world environments.

reddit.com
u/Express_Peak_6876 — 11 days ago
▲ 14 r/moderndotnet+1 crossposts

Respire - A .NET Redis Client

Hey all!

Redis is a great technology, and something that exists in a lot of tech stacks. It has the ability to really help solve complex problems involving distribution across multiple instances of an app. Whether that be caching, locks, rate limits, etc.

Surprisingly, StackExchange.Redis is the only real big main redis client library for .NET.

I'm adding a new client library into the mix - Respire.

Respire aims to be a fast client library for Redis, that also has the ability to utilise Redis' client-side server assisted cache, avoiding network hops for frequently accessed keys, meaning better performance for your apps.

It also has a lot of helpers in it to more easily use distributed locks, rate limits, queues, pub/sub, etc.

I want it to be a client library that handles all the hard bits for you, keeping your code clean and easy to reason about.

It's still pre-release, so I'd like to gather feedback. Are people happy with the performance? The API? Any missing features? Any bugs?

Please try it out and let me know!

More info on why Respire: https://thomhurst.github.io/Respire/docs/#why-respire-exists

Benchmarks: https://thomhurst.github.io/Respire/docs/benchmarks

Stress comparisons: https://thomhurst.github.io/Respire/docs/stress-tests

Thanks all!

reddit.com
u/thomhurst — 12 days ago
▲ 2 r/moderndotnet+2 crossposts

🚀 Un pequeño logro que me motiva a seguir creando para .NET

Hoy quiero compartir un avance de mis proyectos.

📦 MyCrypto.GiqhDev
🔐 Librería .NET para cifrado autenticado, hashing seguro de contraseñas y utilidades criptográficas.
➡️ 625 descargas

🔑 MySerialKey.GiqhDev
🛡️ Librería para generación y validación de claves de licencia/serial para aplicaciones .NET.
➡️ 338 descargas

📊 963 descargas entre ambas librerías.

Puede parecer un número pequeño frente a proyectos con miles o millones de usuarios, pero para mí representa algo importante: hay desarrolladores que están encontrando utilidad en código que nació como proyectos personales.

Lo más interesante del proceso no ha sido solamente publicar los paquetes, sino aprender sobre:

  • Desarrollo de librerías reutilizables para .NET
  • Compatibilidad entre diferentes versiones de .NET
  • Publicación y versionado de paquetes NuGet
  • Seguridad y criptografía
  • Diseño de APIs reutilizables
  • Mantenimiento y evolución de proyectos open source

Y esto recién comienza. 🚀

Mi objetivo es seguir construyendo herramientas para el ecosistema .NET / C#, mejorar las existentes y continuar compartiendo lo que voy aprendiendo en el camino.

963 descargas hoy → muchas más cosas por construir mañana. 💙

#DotNet #CSharp #NuGet #OpenSource #SoftwareDevelopment #Programming #GiqhDev #Developer #Backend #DotNetDeveloper

u/Giqh — 12 days ago

Drawing & Text Shaping -- all open source, cross platform, and AOT compatible

Have you ever needed to draw into a canvas and export that into PNG, JPG, WebP, or AVIF?

How about paint some properly shaped text into that image?

There's several options on the market today, but they are all either commercial paid offerings or are wrappers around native libraries and thus have deployment complications and don't run everywhere .NET does

Well, as some of you know, I'm the maintainer of PeachPDF (https://peachpdf.net/), an open source HTML to PDF rendering engine. Today, I'm not talking about that, though 0.9.21 did land today. Well, any HTML layout engine needs to draw shapes and layout text, most of the work is determining what to paint and where, and then actually painting it into a canvas, and for text, it also needs to know exactly what glyph to put where, and for rasterized text (rare for a PDF admittedly), whether or not to hint the text.

Well, PeachPDF gained some new .NET dependencies this week, though it's mostly just PeachPDF code being liberated from only ever serving PeachPDF! Those dependencies are the PeachDrawing suite of libraries:

  • PeachDrawing.Text: This is your font, text shaping, and hinting engine. This loads OpenType, TrueType, CFF, WOFF, and WOFF2 fonts, shapes some text using those fonts, and tells you which glyph to place and where. You can extract text outlines, you can subset a font, and it has some convenience helpers for things like laying out a whole paragraph.
  • PeachDrawing.Core: Core Canvas abstractions, including integration with PeachDrawing.Text. This is what you would use if you wanted to build your own canvas abstraction, and it's what PeachPDF uses to build a PDF-backed canvas
  • PeachDrawing: A raster canvas implementation with PeachImage integration, so you can export to any PeachImage supported format.

These libraries are maintained and versioned alongside PeachPDF, but are designed to be used outside of PeachPDF. If there are API gaps, or you want to contribute, contributions or suggestions or bugfixes are welcome. The current API surface is what an HTML layout engine needs, which admittedly is a lot, but is far from complete or the best.

If you are currently using SkiaSharp and wished you had something pure managed and AOT-compatible, this is likely a good replacement. Alternatively, if using ImageSharp or SixLabors.Fonts, and you don't qualify for using it under the broadly available Apache 2.0 license grants available, and you are unable or unwilling to license it commercially, this should cover at least some of your needs. If there's a gap, I'd love to hear about it! Most of the API surface exists to be able to render various CSS and SVG constructs, so there are likely gaps in available features.

All of these libraries are currently pre-1.0, but the goal is to release 1.0 in early 2027.

They are all BSD 3-clause licensed. They are free and open source forever. They do include MIT and BSD-licensed third party code that was bundled into PeachPDF before.

You can find them on GitHub in the PeachPDF repo (https://github.com/jhaygood86/PeachPDF), they are live on NuGet, and there's documentation online on the PeachPDF website.

reddit.com
u/jhaygood86 — 13 days ago