Asgard.Core 6.0.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package Asgard.Core --version 6.0.2
                    
NuGet\Install-Package Asgard.Core -Version 6.0.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="Asgard.Core" Version="6.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Asgard.Core" Version="6.0.2" />
                    
Directory.Packages.props
<PackageReference Include="Asgard.Core" />
                    
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 Asgard.Core --version 6.0.2
                    
#r "nuget: Asgard.Core, 6.0.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 Asgard.Core@6.0.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=Asgard.Core&version=6.0.2
                    
Install as a Cake Addin
#tool nuget:?package=Asgard.Core&version=6.0.2
                    
Install as a Cake Tool

Asgard.Core

Asgard.Core 是 Asgard 的核心实现包,提供缓存、任务调度、消息、日志、插件、安全和配置等默认基础设施能力。

如果你已经确定要使用 Asgard 的运行时行为,而不只是依赖接口定义,这个包通常是核心依赖。

适用场景

  • 需要 Asgard 的默认基础设施实现
  • 想统一接入缓存、消息、调度、插件和安全能力
  • 需要基于 Asgard.Abstractions 的契约直接落地运行时

包含内容

  • 基于 Redis 的单层缓存能力
  • 基于 Redis 的轻量分布式锁能力
  • 基于 Quartz 的任务调度与触发器管理
  • 基于 RabbitMQ 的消息基础设施
  • 日志、安全、插件加载和 YAML 配置帮助器

安装

dotnet add package Asgard.Core

快速开始

using Microsoft.Extensions.DependencyInjection;

var services = new ServiceCollection();

services.AddAsgardContext();
services.AddAsgardSecurityServices(options =>
{
    options.Key = "base64-key";
    options.Iv = "base64-iv";
});

独立容器中启用 Redis 后可以直接注册分布式锁,所有行为参数都有默认值:

services.AddSingleton(cacheConfig);
services.AddDistributedLock();

使用 Asgard.Yggdrasil.AspNetCore 时无需手动注册;宿主会在 Redis 可用时自动装配, 并默认启用基于 owner token 校验的安全释放与自动续租。

包关系

  • Asgard.Abstractions:只提供契约和共享模型
  • Asgard.Core:提供默认运行时实现
  • Asgard.AspNetCore.Core:在 Asgard.Core 之上提供 Web 运行时集成
  • Asgard.Yggdrasil.AspNetCore:在更高层提供完整宿主体验

相关资源

如果你计划在 AI 协作场景下使用 Asgard.Core,建议把 Asgard.Skills 一起接入,这样模型能直接理解 Asgard 的项目结构、规范和推荐用法。

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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 (4)

Showing the top 4 NuGet packages that depend on Asgard.Core:

Package Downloads
Asgard.AspNetCore.Core

Asgard.AspNetCore.Core 为 Asgard 框架提供 ASP.NET Core 运行时实现,包括租户感知中间件、身份上下文集成和服务注册帮助器,构建在共享抽象包之上。

Asgard.Yggdrasil.AspNetCore

Asgard.Yggdrasil.AspNetCore 是 Asgard 框架的 ASP.NET Core 主机层,集成 OpenAPI、Scalar、数据保护、日志和核心服务。

Asgard.PluginSdk

Common plugin development dependencies and convenience APIs for Asgard plugins.

Asgard.JsonConverterExtends

沐豆科技阿斯加德框架集,一切为了.NET开发的便利性

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
8.2.0 68 11/20/2026
8.1.0 74 11/19/2026
8.0.0 64 11/19/2026
7.2.0 85 11/17/2026
7.1.0 87 11/17/2026
7.0.0 132 11/13/2026
6.1.0 162 11/6/2026
6.0.4 171 10/24/2026
6.0.3 172 10/11/2026
6.0.2 150 10/8/2026
6.0.1 141 10/8/2026
6.0.0 136 10/1/2026
5.3.0 210 10/1/2026
5.2.3 138 10/1/2026
5.2.2 232 9/1/2026
5.2.1 156 8/26/2026
5.2.0 218 8/6/2026
5.1.5 171 8/4/2026
5.1.4 178 8/3/2026
5.1.3 183 7/26/2026
Loading failed