AspireRunner.AspNetCore 1.4.0

dotnet add package AspireRunner.AspNetCore --version 1.4.0                
NuGet\Install-Package AspireRunner.AspNetCore -Version 1.4.0                
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="AspireRunner.AspNetCore" Version="1.4.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AspireRunner.AspNetCore --version 1.4.0                
#r "nuget: AspireRunner.AspNetCore, 1.4.0"                
#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.
// Install AspireRunner.AspNetCore as a Cake Addin
#addin nuget:?package=AspireRunner.AspNetCore&version=1.4.0

// Install AspireRunner.AspNetCore as a Cake Tool
#tool nuget:?package=AspireRunner.AspNetCore&version=1.4.0                

AspireRunner.AspNetCore

A library for running the Aspire Dashboard alongside ASP.NET Core apps.

The dashboard can display OpenTelemetry data (traces, metrics, and logs) from any application, although this is intended to be used for local development only.

NuGet Version

Example usage

using AspireRunner.AspNetCore;

var builder = WebApplication.CreateBuilder(args);

// ...

if (builder.Environment.IsDevelopment())
{
    // bind from configuration (appsettings.json, etc)
    builder.Services.AddAspireDashboard(options => builder.Configuration.GetSection("AspireDashboard").Bind(options));

    // or pass an options instance
    builder.Services.AddAspireDashboard(new AspireDashboardOptions
    {
        Frontend = new FrontendOptions
        {
            EndpointUrls = "https://localhost:5020"
        },
        Otlp = new OtlpOptions
        {
            EndpointUrl = "https://localhost:4317"
        },
        Runner = new RunnerOptions
        {
            LaunchBrowser = true
        }
    });
}

var app = builder.Build();

// ...

await app.RunAsync();

[!NOTE] The runner will download the dashboard to the user's .dotnet directory (~/.dotnet/.AspireRunner).

Configuration

The runner can be configured with the AspireDashboardOptions class, which contains a subset of the options supported by the Aspire dashboard, but also has runner-specific options under the Runner property:

  • PipeOutput (bool): When enabled, the runner will pipe the output of the dashboard process to the logger.
  • LaunchBrowser (bool): When enabled, the runner will attempt to launch the dashboard in the default browser on startup.
  • SingleInstanceHandling (enum): Controls how the runner should handle multiple instances of the dashboard process:
    1. WarnAndExit: Logs a warning and exits if an existing instance is found.
    2. Ignore: Disables checking for running instances of the Aspire Dashboard. Note that new instances will fail to start if an existing one is using the same port
    3. ReplaceExisting: Kills any existing instance before starting a new one.
  • AutoUpdate (bool): When enabled, the runner will automatically check and update the dashboard to the latest version at startup.
  • PreferredVersion (string): The version of the dashboard to download/run. If not specified or invalid, the latest version will be used.
  • RestartOnFailure (bool): When enabled, the runner will automatically restart the dashboard if it exits unexpectedly.
  • RunRetryCount (int): The number of times to retry running the dashboard if it fails to start
  • RunRetryDelay (int): The delay between retry attempts to restart the dashboard (in seconds).
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. 
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.4.0 69 2/14/2025
1.3.1 2,693 10/9/2024
1.3.0 132 9/6/2024
1.2.0 121 7/27/2024
1.1.7 118 7/17/2024
1.1.6 130 7/6/2024
1.1.5 129 6/21/2024
1.1.4 110 6/19/2024
1.1.3 5,720 5/31/2024
1.1.2 119 5/25/2024