# Execute the .NET project
This C# source targets .NET 10. It has **not been executed by the publisher: UNVERIFIED**. From `dotnet`, use a disposable environment with SDK 10 and NuGet access:

```bash
dotnet --info
dotnet restore Readiness.sln
dotnet test Readiness.sln --no-restore --logger "trx;LogFileName=net004.trx" --results-directory TestResults
```

Retain SDK information, each command's exit code, actual TRX output and the lock file generated by restore. The first restore resolves transitive packages; no resolved lock is fabricated here. After generating it, verify a subsequent restore using `dotnet restore Readiness.sln --locked-mode`.

Dependencies have explicit instructional version pins. They are not claimed to be the latest versions or to have passed compatibility execution. Recheck versions before practical use; package source links are in the references.

Seven test cases are planned after expanding theories: normal request, two invalid-options cases, two health states, timeout with telemetry, and host start/stop. Read actual counts and results from TRX.

Optional process run in Bash, from this directory:
```bash
Service__Name=lesson-service Dependency__TimeoutMs=100 dotnet run --project ReadinessService
```
In PowerShell:
```powershell
$env:Service__Name='lesson-service'
$env:Dependency__TimeoutMs='100'
dotnet run --project ReadinessService
```
Use the bind address printed by that run; examine `/sample`, `/ready` and `/live`, then request shutdown with Ctrl+C. Use a temporary test shell for environment values. Missing settings must reject startup; observe actual timing from execution.

The tests have no external network dependency. Health uses synthetic availability. In-memory listeners and a logger collect telemetry. The canary assertion covers only the response and captured logs on this path, not comprehensive redaction. The shutdown test checks host completion, not in-flight draining or container behavior. Target-profile transfer needs a separate recorded execution.


Accompanying resources: [CSV](../resources/NET-004-T1.csv), [rubric](../resources/rubric.md), [source links](../resources/source_links.md).
