Zum Fußzeileninhalt springen
.NET HILFE

NuGet-Pakete (PDF, OCR, Barcode, Excel): Aktualisierte Liste

The .NET package manager library is called NuGet. One of the languages that developers use the most frequently is C#, which suggests that it is a very productive language. There are other free NuGet packages available that boost C# productivity even more. NuGet packages feature in various IDEs, for example, Visual Studio.

We can use the same package of NuGet on different environments like Web, Windows, and Mobile, etc. We can install the NuGet package with newer versions under Package Manager Console. Visual Studio has a built-in high-performance NuGet extension installed. With NuGet Package Manager, you can produce and consume packages in a convenient way within a repository. It also helps us in publishing packages.

Execute the following command in Visual Studio source control project to add a NuGet package:

dotnet add package --source {source_name} --version {package_version} {package_name}

Parameter Description

  • source_name: The desired .NET package source name.
  • package_name: The NuGet package name of .NET/.NET Core library.
  • package_version: The package version number.

The top 10 NuGet packages for increasing developers' productivity when using C# in multiple projects are covered in this article:

  • RestSharp
  • Json.NET
  • Iron Software
  • Serilog
  • NUnit
  • Insight.Database
  • FluentValidation
  • FluentEmail
  • Hangfire
  • LazyCache

RestSharp

Representational State Transfer is known as REST. With an average of over 43,000 downloads each day, RestSharp has passed over 190 million downloads on NuGet. It is the most widely used HTTP client library for .NET projects, making it simple for C# developers to call remote resources over HTTP, taking care of the request body's serialization to JSON or XML and deserialization in the response. The new version of the RestSharp NuGet package supports:

  • Synchronous and asynchronous queries.
  • Serialization and deserialization.
  • Various HTTP request types, including GET, POST, PUT, and DELETE.
  • Different authentication formats.

Json.NET

Json.NET is a minimalistic JSON handler library. With over 1 billion NuGet downloads/installations, Json.NET is one of the free and open-source packages for the .NET platform. Its salient characteristics are as follows:

  • Serialization and deserialization of any .NET object to and from JSON.
  • Conversion between XML and JSON to C# data models.
  • Support for LINQ queries with objects, JArray, and JValue.
  • Performance is 25% quicker than JavaScriptSerializer and 50% faster than DataContractJsonSerializer.

Iron Software

For .NET and Entity Framework (EF) Core programmers working with PDF, OCR, Excel, and barcodes, Iron Software created a collection of public repository software libraries with useful code. With over 5.5 million downloads, it can be available in the NuGet Package Manager with different package names as described below. The key features of the Iron Software products are detailed.

IronXL

  • Edit, read, and load data from XLS, XLSX, CSV, and TSV formats.
  • Export data to CSV, TSV, JSON, XLS, and XLSX for archival purposes.
  • Sorting of columns, rows, and ranges.
  • Styling capabilities including cell visual styles, font, size, border, alignment, lock, freeze cells, hide/unhide rows, and number formats.
  • Simple C# and VB.NET Excel Document API.

IronBarcode

  • Supports a wide range of barcode types and QR standards including UPC, EAN, Code 39, QR, Data Matrix, and more.
  • Pre-processes barcode images to enhance reading accuracy and speed. This includes correcting rotation, noise, distortion, and skewing. Suitable for server programs that perform batch processing using multi-core systems.
  • Create barcodes and QR codes for various document types, allowing modifications like text, rotation, size, color, and quality in several formats like PDF, JPG, TIFF, etc.

IronOCR

  • Extracts text, barcodes, and QR codes from images or PDFs utilizing the Tesseract 5 engine.
  • Supports over 125 languages, enabling customized language configurations.
  • Compatible with multipage GIF and TIFF image formats.
  • Improves poorly scanned image quality.
  • Supports multi-threading, facilitating multiple simultaneous operations.
  • Outputs structured data to pages, paragraphs, lines, words, and characters.

IronPDF

  • Generate PDF files from HTML, HTML5, ASPX, and Razor/MVC View.
  • Capabilities to print, merge, split PDF files, extract and search text, rasterize pages to images, and convert PDFs to and from HTML.
  • Allows the creation of documents from URLs with options to use network login credentials, proxies, cookies, HTTP headers, and more.

For more details refer to Iron Software Products.

Serilog

Logging is crucial for application development as it assists developers in finding and fixing issues. Serilog is a new logging and change tracking system in .NET that logs actions, exceptions, information, and warnings in JSON format. Serilog offers structured logs which enhance traditional logging by providing better context and data insights. It supports diagnostic logging to files, console, and various storage systems.

NUnit

Testing is vital for ensuring code correctness. NUnit is an open-source unit testing framework for .NET, easing the process of testing by breaking down large applications into smaller testable units. It helps in identifying bugs during development and is distributed under the MIT license.

Insight.Database

Insight.Database is a micro-ORM for .NET that simplifies database operations by converting C# objects to database records and vice versa. It provides extension methods for easier database handling and schema migrations. Key features include:

  • Automatic opening and closing of database connections.
  • Simplified stored procedure execution.
  • Support for multiple result sets.

FluentValidation

FluentValidation is a .NET package used to create strongly typed validation rules using lambda expressions and Fluent interfaces. It helps maintain clean domain code by providing a location for verification logic. FluentValidation 11 supports various platforms like .NET Standard, .NET Core, and .NET 5, 6, and 7.

FluentEmail

FluentEmail is an open-source .NET library designed to make email-sending capabilities easy to integrate into .NET applications. It supports creating email templates with Razor and sending emails via SendGrid, MailGun, SMTP, and others.

Hangfire

Hangfire is an open-source framework enabling .NET and .NET Core applications to perform background tasks. It manages jobs such as mass email notifications, graph processing, and batch importing from different formats like XML and JSON.

LazyCache

LazyCache provides a straightforward in-memory caching service that improves application performance by caching web service calls, complex object constructions, and database operations. Its default settings cache content for up to 20 minutes.

Conclusion

The top 10 NuGet packages to enhance C# programming productivity have been discussed. These packages alleviate the workload and expedite the development process. NuGet client tools facilitate the creation and consumption of packages, while Iron Software provides advanced solutions for enterprises and startups with libraries compatible across various .NET frameworks and languages such as C#, VB, and F#.

Häufig gestellte Fragen

Wie können NuGet-Pakete die Produktivität in C#-Projekten steigern?

NuGet-Pakete steigern die Produktivität in C#-Projekten, indem sie wiederverwendbare Codebibliotheken bereitstellen, die die Abhängigkeitsverwaltung vereinfachen und den Entwicklungsprozess über verschiedene Umgebungen wie Web, Windows und Mobile optimieren.

Welche Rolle spielt NuGet in der .NET-Entwicklung?

NuGet dient als Paketmanager für .NET und erleichtert die Erstellung, Verteilung und Verwendung von Softwarepaketen. Es ist nahtlos in IDEs wie Visual Studio integriert, um die Produktivität von C#-Entwicklern zu steigern.

Wie installiere ich ein NuGet-Paket mit der Package Manager Console?

Um ein NuGet-Paket mit der Package Manager Console zu installieren, können Sie den Befehl Install-Package {package_name} verwenden. Dieser Befehl lädt das angegebene Paket und dessen Abhängigkeiten herunter und installiert sie.

Welche Funktionen bieten die Bibliotheken von Iron Software für die PDF-Verwaltung?

Die Bibliotheken von Iron Software für die PDF-Verwaltung bieten Funktionen wie das Erstellen von PDFs aus HTML, das Zusammenführen und Aufteilen von PDFs, die Textextraktion und -suche sowie die Umwandlung von PDFs in und aus HTML.

Wie kann IronOCR in .NET-Anwendungen verwendet werden?

IronOCR kann in .NET-Anwendungen genutzt werden, um Text, Barcodes und QR-Codes aus Bildern oder PDFs zu extrahieren. Es unterstützt über 125 Sprachen und ist darauf optimiert, die Qualität schlecht gescannter Dokumente zu verbessern.

Was sind die Hauptvorteile der Verwendung von Serilog in .NET-Anwendungen?

Serilog bietet strukturiertes Logging in .NET-Anwendungen, was die Lesbarkeit von Logs verbessert und bessere Datenanalysen ermöglicht. Es unterstützt das Logging in verschiedene Ausgaben, einschließlich Dateien, Konsolen und Cloud-Dienste.

Warum ist Json.NET bei der JSON-Verarbeitung in .NET so beliebt?

Json.NET ist bei der JSON-Verarbeitung in .NET beliebt aufgrund seiner effizienten Serialisierungs- und Deserialisierungsfähigkeiten sowie seines umfassenden Funktionsumfangs zur Verarbeitung von JSON-Daten.

Wie erleichtert Hangfire das Management von Hintergrundaufgaben in .NET?

Hangfire erleichtert das Management von Hintergrundaufgaben in .NET, indem es Anwendungen ermöglicht, Aufgaben wie E-Mail-Benachrichtigungen und Datenverarbeitung im Hintergrund auszuführen, wodurch die Anwendungsleistung und Reaktionsfähigkeit verbessert werden.

Welche Bedeutung hat FluentValidation in .NET-Anwendungen?

FluentValidation ist in .NET-Anwendungen bedeutend für die Erstellung stark typisierter Validierungsregeln, die helfen, sauberen Code zu pflegen, indem sie die Verifikationslogik zentralisieren und die Unordnung in Domänenmodellen reduzieren.

Wie verbessert LazyCache die Leistung in .NET-Anwendungen?

LazyCache verbessert die Leistung in .NET-Anwendungen, indem komplexe Operationen und Web-Service-Anfragen im Speicher zwischengespeichert werden, was redundante Verarbeitungen und Datenbankabfragen reduziert und die Antwortzeiten der Anwendung beschleunigt.

Curtis Chau
Technischer Autor

Curtis Chau hat einen Bachelor-Abschluss in Informatik von der Carleton University und ist spezialisiert auf Frontend-Entwicklung mit Expertise in Node.js, TypeScript, JavaScript und React. Leidenschaftlich widmet er sich der Erstellung intuitiver und ästhetisch ansprechender Benutzerschnittstellen und arbeitet gerne mit modernen Frameworks sowie der Erstellung gut strukturierter, optisch ansprechender ...

Weiterlesen