ProtoTest.Hosting 1.1.9

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

ProtoTest.Hosting

Runs a background worker or generic host in-process with the suite: it starts with the run, reads the run's settings and stops with the run.

dotnet add package ProtoTest.Hosting

Includes

  • Registration through AddWorkerHost<TProgram>(); the suite runs the worker's own entry point.
  • Nested workers: AddApplication(...).AddWorkerHost<TProgram>("Billing") follows the application's provider chain: UseEnvironment() leaves the worker to the environment that runs the application, while UseHost() hosts it in this process and bridges the test clock.
  • Run-scoped lifetime: started after the infrastructure registered before it, stopped with the run.
  • The suite's configuration, the run's settings (container connection strings and settings infrastructure values) and AddWorkerHost options reach the worker's normal configuration, in that order of precedence, and are passed to the worker's Main as command-line arguments, so Host.CreateApplicationBuilder(args) reads final-precedence values before Build().
  • Access from a test through Proto.Context.Host<TProgram>() and HostService<TProgram, TService>().

Limits

  • In-process only: a suite running against a published environment has no worker to start. Skip those tests with [RequiresCapability(ProtoCapabilityKinds.Worker)] - or nest the worker under its application, where UseEnvironment() decides from the application's winner and starts nothing.
  • One worker instance per run; the run's state is shared between tests.
  • Only a hosted worker (UseHost()) declares the clock capability and resolves Proto.Context.Host<TProgram>(); a worker the environment runs declares worker only.
  • The worker's Run() never runs; the suite starts and stops its host.
  • A parameterless Main, or one that builds its host without passing args, reads the overlay only when the host is built; options factories and hosted services still see it.
  • Start does not wait for readiness; register a readiness probe before the worker when it depends on a container that is still booting.

Learn more

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.

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.1.9 79 10/10/2026
1.1.8 97 10/10/2026
1.1.7 98 10/9/2026
1.1.6 148 10/4/2026
1.1.5 101 10/3/2026
1.1.4 94 10/3/2026
1.1.3 101 10/3/2026
1.1.2 91 10/3/2026
1.1.1 97 10/2/2026
1.1.0 113 10/2/2026