C3D.Extensions.Aspire.WaitForOutput
0.1.10
There is a newer version of this package available.
See the version list below for details.
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" />
<PackageReference Include="C3D.Extensions.Aspire.WaitForOutput" />
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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#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
#tool nuget:?package=C3D.Extensions.Aspire.WaitForOutput&version=0.1.10
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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 | Versions 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.
-
net9.0
- C3D.Extensions.Aspire.OutputWatcher (>= 0.1.8)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.