Dut00.AppInfo 0.1.0-preview.5

This is a prerelease version of Dut00.AppInfo.
dotnet add package Dut00.AppInfo --version 0.1.0-preview.5
                    
NuGet\Install-Package Dut00.AppInfo -Version 0.1.0-preview.5
                    
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="Dut00.AppInfo" Version="0.1.0-preview.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Dut00.AppInfo" Version="0.1.0-preview.5" />
                    
Directory.Packages.props
<PackageReference Include="Dut00.AppInfo" />
                    
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 Dut00.AppInfo --version 0.1.0-preview.5
                    
#r "nuget: Dut00.AppInfo, 0.1.0-preview.5"
                    
#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 Dut00.AppInfo@0.1.0-preview.5
                    
#: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=Dut00.AppInfo&version=0.1.0-preview.5&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Dut00.AppInfo&version=0.1.0-preview.5&prerelease
                    
Install as a Cake Tool

Dut00.AppInfo

Adds an /appinfo endpoint to ASP.NET Core applications. It returns JSON describing the running application.

using Dut00.AppInfo;

builder.Services.AddAppInfo()
    .WithOwner("red_team@company.com")
    .WithProperty("Team", "red")
    .WithProperty("StartedBy", sp => sp.GetRequiredService<IMyService>().User);

var app = builder.Build();
app.MapAppInfo(); // GET /appinfo
{
  "ApplicationName": "Company.Billing.Api",
  "Version": "1.0.5.0",
  "Environment": "Stage",
  "IsProduction": false,
  "Owner": "red_team@company.com",
  "Team": "red",
  "StartedBy": "deploy-bot"
}

API

Member Adds
AddAppInfo(o => ...) ApplicationName, Version (entry assembly), Environment, IsProduction
WithOwner(owner) Owner
WithProperty(key, value) A custom key with a constant value
WithProperty(key, sp => ...) A custom key computed on every request; the factory may resolve scoped services
WithContributor<T>() Everything a custom IAppInfoContributor writes
MapAppInfo(pattern = "/appinfo") The GET endpoint; returns IEndpointConventionBuilder

To write a constant null, cast it: WithProperty("Key", (object?)null). A plain null binds to the factory overload and throws.

Keys appear in registration order. Use o.KeyNamingPolicy = JsonNamingPolicy.CamelCase (or any JsonNamingPolicy) to change the key format; o.JsonSerializerOptions gives full control over value serialization.

More fields come from the extension packages: Dut00.AppInfo.Configuration, Dut00.AppInfo.Environment and Dut00.AppInfo.ConnectionStrings.

Custom contributors

public sealed class GitInfoContributor : IAppInfoContributor
{
    public ValueTask ContributeAsync(AppInfoContext context, CancellationToken cancellationToken)
    {
        context.Set("Commit", System.Environment.GetEnvironmentVariable("GIT_COMMIT"));
        return ValueTask.CompletedTask;
    }
}

builder.Services.AddAppInfo().WithContributor<GitInfoContributor>();

The endpoint is open by default and may expose internal details. Protect it, for example with app.MapAppInfo().RequireAuthorization().

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 is compatible.  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 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.
  • net10.0

    • No dependencies.
  • net8.0

    • No dependencies.
  • net9.0

    • No dependencies.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Dut00.AppInfo:

Package Downloads
Dut00.AppInfo.ConnectionStrings

Extends the Dut00.AppInfo /appinfo endpoint with the application's connection strings, with passwords, keys and other secrets masked.

Dut00.AppInfo.Environment

Extends the Dut00.AppInfo /appinfo endpoint with process uptime, host name, content root path and entry assembly location.

Dut00.AppInfo.Configuration

Extends the Dut00.AppInfo /appinfo endpoint with the list of configuration files the application loaded.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0-preview.5 36 10/4/2026
0.1.0-preview.4 33 10/4/2026