Purview.Aspire.ResourceKit 1.0.0-prerelease.9

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

Purview.Aspire.ResourceKit

Purview.Aspire.ResourceKit is a source-generator-powered framework for structuring .NET Aspire AppHost resource composition as strongly typed, test-friendly classes.

If your AppHost is getting bigger, this helps you keep resource setup maintainable and discoverable by moving composition into focused resource classes and generating the plumbing for you.

Lifecycle quick links

Why teams use it

  • Cleaner AppHost code with resource logic split into dedicated classes.
  • Strong typing + IntelliSense instead of stringly-typed setup.
  • Generated wiring for host/resource options and registration.
  • Predictable lifecycle (Build then Configure) for inter-resource dependencies.
  • Testability with options overrides and isolated resource composition.

Quick example

using Aspire.Hosting;
using Aspire.Hosting.ApplicationModel;
using Purview.Aspire.ResourceKit;

[HostKit]
partial class ShopHostKit;

[ResourceDefinition<ProjectResource>("api")]
partial class ApiResourceKit
{
    protected override IResourceBuilder<ProjectResource> BuildResource(IDistributedApplicationBuilder builder)
        => builder.AddProject<Projects.Example_Service>(Name);
}

var builder = DistributedApplication.CreateBuilder(args);
builder.AddAspireResourceKit();

The extension method name is generated from your host metadata; in this repository sample it is AddAspireResourceKit().

Built-in AI agent skills (auto-installed via NuGet)

This package can ship one or more bundled Agent Skills. When a consuming project builds, any skills/**/SKILL.md files in the package are copied to:

  • .agents/skills/**

Example:

  • skills/aspire-apphost-to-resourcekit/SKILL.md.agents/skills/aspire-apphost-to-resourcekit/SKILL.md

It also writes a local .gitignore into each generated skill folder to keep updates out of source control noise.

To disable this behavior, set the shared opt-out property in your project (or Directory.Build.props):

<EnableEmbeddedAgentSkills>false</EnableEmbeddedAgentSkills>

Lifecycle mental model (early cheat sheet)

ResourceKit has two layers of lifecycle methods:

  • Build / BuildResource(...): construct this resource (AddProject, AddRedis, etc.).
  • Configure / ConfigureResource(): attach resources to each other (references, bindings, cross-resource wiring).

Enablement is evaluated before resource construction:

  • IsEnabled is the persisted toggle (typically from generated options).
  • IsResourceEnabled(builder) is the runtime hook used by Build to decide whether this resource should run now.
  • If it evaluates to false, both BuildResource(...) and ConfigureResource() are skipped for that resource.

Use IsResourceEnabled(builder) when enablement depends on runtime state (environment, config, publish mode, etc.), not just static options.

What gets generated

From your [HostKit] and [ResourceDefinition] declarations, ResourceKit generates:

  • a host resource base class,
  • resource properties on the host,
  • host + per-resource options (when enabled),
  • an AppHost extension method to build/configure/register your host kit.

Learn more

Repository layout

  • src/src/ResourceKit — runtime package source.
  • src/src/SourceGeneration — Roslyn source generator.
  • src/src/Example.* — sample Aspire applications.
  • src/tests/* — unit and integration tests.
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

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
1.0.0-prerelease.20 37 8/27/2026
1.0.0-prerelease.19 100 8/16/2026
1.0.0-prerelease.18 61 8/14/2026
1.0.0-prerelease.17 57 8/13/2026
1.0.0-prerelease.16 56 8/12/2026
1.0.0-prerelease.15 61 8/10/2026
1.0.0-prerelease.14 56 8/5/2026
1.0.0-prerelease.13 54 8/5/2026
1.0.0-prerelease.12 60 8/4/2026
1.0.0-prerelease.11 66 8/2/2026
1.0.0-prerelease.10 61 8/2/2026
1.0.0-prerelease.9 68 7/31/2026
1.0.0-prerelease.8 63 7/29/2026
1.0.0-prerelease.7 58 7/28/2026
1.0.0-prerelease.6 66 7/27/2026
1.0.0-prerelease.5 63 7/26/2026
1.0.0-prerelease.4 60 7/26/2026
1.0.0-prerelease.3 62 7/26/2026
1.0.0-prerelease.2 56 7/24/2026
1.0.0-prerelease.1 57 7/24/2026