C3D.Extensions.Aspire.WaitForOutput 0.1.10

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

C3D.Extensions.Aspire.WaitForOutput

This is a simple utility that waits for a specific string to appear in the console output of a process before starting the next process when using Aspire.

It is useful for integration tests where you want to wait for a specific string to appear in the console output of a process before proceeding.

Usage

var builder = DistributedApplication.CreateBuilder(args);

var sql = builder.AddSqlServer("sql");
var sqldb = sql.AddDatabase("sqldb");

// Example of waiting for a console app to output a specific message
// This could be an Executable of some sort - such as Node, Python, etc.
// We wait for some pre-requisite to be ready, then we wait for the console app to output a specific message
var console = builder.AddProject<Projects.WaitForConsole_ConsoleApp>("consoleapp")
    .WithReference(sqldb, "sqldb")
    .WaitFor(sqldb);

// webapp won't start until console has output the message "Ready Now..."
// Note that 'console' does not have to exit, it just has to output the message
builder.AddProject<Projects.WaitForConsole_WebApp>("webapp")
    .WithReference(sqldb, "sqldb")
    .WaitFor(sqldb)
    .WaitForOutput(console, m => m == "Ready Now...");

builder.Build().Run();
Product Compatible and additional computed target framework versions.
.NET 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 was computed.  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
0.1.17 220 5/12/2025
0.1.11 74 4/19/2025
0.1.10 130 3/27/2025
0.1.6 449 3/26/2025