Aicrosoft.Extensions.Azure 8.0.0-beta.260130.2

This is a prerelease version of Aicrosoft.Extensions.Azure.
dotnet add package Aicrosoft.Extensions.Azure --version 8.0.0-beta.260130.2
                    
NuGet\Install-Package Aicrosoft.Extensions.Azure -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.Azure" 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.Azure" Version="8.0.0-beta.260130.2" />
                    
Directory.Packages.props
<PackageReference Include="Aicrosoft.Extensions.Azure" />
                    
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.Azure --version 8.0.0-beta.260130.2
                    
#r "nuget: Aicrosoft.Extensions.Azure, 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.Azure@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.Azure&version=8.0.0-beta.260130.2&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Aicrosoft.Extensions.Azure&version=8.0.0-beta.260130.2&prerelease
                    
Install as a Cake Tool

Aicrosoft.Extensions.Azure

Aicrosoft.Extensions.Azure is an extension library for the Aicrosoft framework, designed to simplify interactions with Azure cloud services. it provides a centralized way to manage Azure SDK clients and offers convenient extension methods for common Azure tasks like Resource Management, Key Vault, Blob Storage, and Microsoft Graph.

Design Goals

  1. Centralized Client Management: Provide a unified IAzureClientService to manage authenticated instances of ArmClient, GraphServiceClient, and SecretClient.
  2. Simplified Azure SDK Operations: Offer easy-to-use wrappers and extension methods for common tasks (e.g., uploading to Blob Storage, fetching secrets from Key Vault) to reduce boilerplate code.
  3. Deployment Automation Support: Include components to facilitate Azure Resource Manager (ARM) template deployments and service configuration.
  4. Microsoft Graph Integration: Simplify complex Graph API operations such as managing applications, service principals, and app role assignments.
  5. Seamless Hosting Integration: Integrated with Aicrosoft.Extensions.Hosting through AzureServiceBase, allowing for consistent service patterns in Azure-aware applications.

Key Features

  • IAzureClientService: A single point of access for various Azure SDK clients, handled with appropriate authentication.
  • AzureServiceBase: A base class for business services that require Azure access, leveraging dependency injection.
  • Key Vault Extensions: GetOrDefaultAsync and SetSecretAsync methods to simplify secret management.
  • Blob Storage Helpers: Simple static methods for uploading and downloading blobs.
  • Graph API Extensions: Extended functionality for Microsoft.Graph.Models.Application and ServicePrincipal to manage permissions and roles easily.
  • Azure WebApp Deployment: Tools like WebAppDeployer for automating web application deployments to Azure.

Usage

1. Installation

Reference the Aicrosoft.Extensions.Azure package in your project.

2. Implementing an Azure-ready Service

Inherit from AzureServiceBase to gain access to Azure clients:

using Aicrosoft.AzureDeploy.Services;

public class MyAzureService : AzureServiceBase
{
    public MyAzureService(IServiceProvider serviceProvider) : base(serviceProvider)
    {
    }

    public async Task DoSomething()
    {
        // Access ARM Client
        var armClient = AzClient.ArmClient;
        
        // Access Key Vault Secret
        var secretClient = AzClient.GetSecretClient("my-kv-name");
        var secret = await secretClient.GetOrDefaultAsync("my-secret");
    }
}

3. Using Blob Storage Helpers

using Azure.Blob;

string connStr = "...";
var uri = await BlobContainer.UploadToContainer(connStr, "my-container", "file.txt", "C:\\local\\file.txt");

4. Microsoft Graph Operations

using Microsoft.Graph;

// Assuming you have a GraphServiceClient instance
await graphClient.Applications["id"].AddAppRoleAssignmentAsync(servicePrincipalId, appRoleId);
  • Aicrosoft.Extensions.Hosting: Provides the base hosting and DI infrastructure.
  • Aicrosoft.Extensions.NLog: Integrated logging support.
Product Compatible and additional computed target framework versions.
.NET 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
8.0.0-beta.260130.2 117 1/30/2026
8.0.0-beta.260127.1 93 1/27/2026
8.0.0-beta.251110.1 239 11/10/2025