Dut00.AppInfo
0.1.0-preview.5
dotnet add package Dut00.AppInfo --version 0.1.0-preview.5
NuGet\Install-Package Dut00.AppInfo -Version 0.1.0-preview.5
<PackageReference Include="Dut00.AppInfo" Version="0.1.0-preview.5" />
<PackageVersion Include="Dut00.AppInfo" Version="0.1.0-preview.5" />
<PackageReference Include="Dut00.AppInfo" />
paket add Dut00.AppInfo --version 0.1.0-preview.5
#r "nuget: Dut00.AppInfo, 0.1.0-preview.5"
#:package Dut00.AppInfo@0.1.0-preview.5
#addin nuget:?package=Dut00.AppInfo&version=0.1.0-preview.5&prerelease
#tool nuget:?package=Dut00.AppInfo&version=0.1.0-preview.5&prerelease
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 | Versions 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. |
-
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 |