Aicrosoft.Extensions 8.0.0-beta.260130.2

This is a prerelease version of Aicrosoft.Extensions.
dotnet add package Aicrosoft.Extensions --version 8.0.0-beta.260130.2
                    
NuGet\Install-Package Aicrosoft.Extensions -Version 8.0.0-beta.260130.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Aicrosoft.Extensions" Version="8.0.0-beta.260130.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Aicrosoft.Extensions" Version="8.0.0-beta.260130.2" />
                    
Directory.Packages.props
<PackageReference Include="Aicrosoft.Extensions" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Aicrosoft.Extensions --version 8.0.0-beta.260130.2
                    
#r "nuget: Aicrosoft.Extensions, 8.0.0-beta.260130.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Aicrosoft.Extensions@8.0.0-beta.260130.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Aicrosoft.Extensions&version=8.0.0-beta.260130.2&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Aicrosoft.Extensions&version=8.0.0-beta.260130.2&prerelease
                    
Install as a Cake Tool

Aicrosoft.Extensions

Aicrosoft.Extensions is a comprehensive utility library that provides a wide range of extension methods and helper classes to simplify common tasks in .NET development. It aims to reduce boilerplate code and improve developer productivity by extending the capabilities of the standard .NET system types.

Design Goals

  1. Reduce Redundant Code: Centrally implement frequently used functions like string manipulation, IO operations, and JSON transformation to avoid reinventing the wheel in every project.
  2. Enhance Native Types: Inject practical methods into native types such as string, DateTime, Enum, and List, making code cleaner and more readable.
  3. Fluent Parameter Validation: Provide a Check class for elegant defensive programming through fluent argument validation.
  4. Broad Compatibility: Support .NET Standard 2.0, .NET Framework 4.6.2, and .NET 8.0, ensuring seamless usage in both legacy systems and modern applications.
  5. Built-in Utilities: Include lightweight versions of caching (ICache), console progress bars, file locking mechanisms, and other tools commonly needed during development.

Core Features

1. System Type Extensions (System)

  • String: Truncate, ToCamelCase, ToMd5, ToEnum, Left/Right manipulation, and more.
  • Collections: IsNullOrEmpty checks, ForEach iterators, and dictionary merging.
  • DateTime: Human-readable time displays, customized formatting, and period calculations.
  • Object: ToJson (easy serialization), As<T> (safe casting), and property copying.

2. Parameter Validation (Check)

A concise API for validating method arguments:

  • Check.NotNull(obj): Validates that an object is not null.
  • Check.NotNullOrEmpty(str): Validates that a string is neither null nor empty.
  • Check.Length(str, max, min): Validates that a string's length is within a specified range.

3. Data Processing (System.Text, System.Xml)

  • JSON Enhancements: PolymorphicValueConverter for handling polymorphic types, and ToRemoveJsonComments for cleaning JSON strings.
  • XML Utilities: Simplified methods for XML parsing and transformation.

4. IO & Diagnostics (System.IO, System.Diagnostics)

  • File System: Recursive directory deletion, safe file reading, and path normalization.
  • Diagnostics: Simplified output methods like ToTrace() and ToDebug() for direct logging to debug terminals.
  • Console Interaction: Built-in ProgressBar for displaying task progress in the command line.

Usage Examples

String Manipulation

using System;

// Truncate with an ellipsis
string title = "This is a very long article title that needs to be shortened";
string display = title.TruncateWithPostfix(20, "..."); // "This is a very lon..."

// Case conversion
string kebab = "UserRoleMember".ToKebabCase(); // "user-role-member"

Robust Parameter Checking

public void UpdateEmail(string email)
{
    // Throws an exception with the parameter name if email is null or whitespace
    Check.NotNullOrWhiteSpace(email, nameof(email));
    
    // Logic here...
}

Console Progress Bar

using (var progress = new ProgressBar()) 
{
    for (int i = 0; i <= 100; i++) 
    {
        progress.Report((double)i / 100);
        // Execute task...
    }
}
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (7)

Showing the top 5 NuGet packages that depend on Aicrosoft.Extensions:

Package Downloads
Aicrosoft.Extensions.Hosting

- Implemented plugin framework and several foundational service base classes; - Added logger scope extensions and enhanced dependency injection utilities with extended DI features;

Aicrosoft.Extensions.AspectCore

Some extensions and implementations related to Aspect-Oriented Programming [AOP].

Aicrosoft.Extensions.Mvc

Extensions for dotnet Mvc Web.

Aicrosoft.Scheduling

> Keywords: `jobsFactory`, `jobs`, `task`, `job`, `routine`, `schedule`, `setup`, `startup`, `interval`, `cronexpression`, `jobagent` [JobsFactory](https://www.nuget.org/packages/Aicrosoft.Scheduling/) is a task scheduling framework that supports multiple types of jobs(tasks) and is easily extensible. It is written in [dotnet8](https://dotnet.microsoft.com/en-us/). An implementation example of the JobsFactory framework: [JobAgent](https://github.com/neatFactory/JobAgent)

Aicrosoft.Extensions.Azure

Extensions related to Azure and azure deployment.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
8.0.0-beta.260130.2 75 1/30/2026
8.0.0-beta.260127.1 77 1/27/2026
8.0.0-beta.251110.1 368 11/10/2025
Loading failed