Eternet.Testing.Build
1.0.0
Prefix Reserved
dotnet add package Eternet.Testing.Build --version 1.0.0
NuGet\Install-Package Eternet.Testing.Build -Version 1.0.0
<PackageReference Include="Eternet.Testing.Build" Version="1.0.0" />
<PackageVersion Include="Eternet.Testing.Build" Version="1.0.0" />
<PackageReference Include="Eternet.Testing.Build" />
paket add Eternet.Testing.Build --version 1.0.0
#r "nuget: Eternet.Testing.Build, 1.0.0"
#:package Eternet.Testing.Build@1.0.0
#addin nuget:?package=Eternet.Testing.Build&version=1.0.0
#tool nuget:?package=Eternet.Testing.Build&version=1.0.0
Eternet.Testing.Build
Build props for Eternet test projects: one way to write and run tests across the ecosystem (Eternet/Eternet.AspNetCore#1359). It is not a library: it adds no assembly, only dependencies and MSBuild properties.
What a test project gets
| Area | Contract |
|---|---|
| Framework | xunit.v3.mtp-v2 4.0.3 exactly (brings xunit.analyzers) |
| Platform | Microsoft.Testing.Platform 2.5.2, UseMicrosoftTestingPlatformRunner, TestingPlatformDotnetTestSupport |
| Reports | Microsoft.Testing.Extensions.TrxReport 2.5.2 exactly (--report-trx) |
| Assertions and doubles | AwesomeAssertions >= 9.4.0, NSubstitute >= 5.3.0, NSubstitute.Analyzers.CSharp >= 1.0.17 |
| Host | OutputType=Exe, IsTestProject=true, deterministic C# entry point (XunitAutoGeneratedEntryPoint=false) |
| Test identity | <Assembly>.uniqueid next to the assembly, containing the assembly name |
xUnit v3 computes the assembly unique ID, and from it every test case UID, from the assembly path unless
<Assembly>.uniqueid exists next to the assembly. The file makes test UIDs independent of the checkout and output
paths, so the same test keeps its UID across machines and isolated build roots. Override the content with
EternetTestingAssemblyUniqueId, or turn the file off with EternetTestingWriteUniqueId=false.
What it rejects
The build fails (ETTB001) when the project references a package outside the contract: VSTest
(Microsoft.NET.Test.Sdk, xunit.runner.visualstudio), xUnit v2 (xunit, xunit.core), other xUnit v3 runners
(xunit.v3, xunit.v3.mtp-v1, xunit.v3.mtp-off, ...) or FluentAssertions. A direct reference to a pinned package
(xunit.v3.mtp-v2, Microsoft.Testing.Extensions.TrxReport) fails with ETTB002, because it would replace the
contract version. A project that is not an executable fails with ETTB003, and re-enabling xUnit's path-seeded
auto-generated entry point (XunitAutoGeneratedEntryPoint=true) in C# fails with ETTB005.
EternetTestingContractValidation=false skips these checks.
Usage
Reference only this package from each test project and remove the test framework references:
<ItemGroup>
<PackageReference Include="Eternet.Testing.Build" />
</ItemGroup>
With Central Package Management, add one PackageVersion for Eternet.Testing.Build. Do not add PackageVersion
entries for xunit.v3.mtp-v2 or Microsoft.Testing.Extensions.TrxReport with other versions: with transitive pinning
they would override the contract (NuGet reports NU1608). AwesomeAssertions and NSubstitute accept a newer version
from the consumer.
Why these versions
ETP certifies an xUnit release for class partitioning through its framework contract
(tools/Eternet.TestPlanner/Shared/etp.xunit-framework-contract.v1.txt) and for build-output equivalence through the
exact hashes of the xUnit and MTP targets. xUnit 4.0.3 with MTP 2.5.2 is certified for both once
Eternet.Testing.Build disables xUnit's path-seeded XunitGenerateEntryPoint (SuffixSeed="$(MSBuildProjectFullPath)")
and emits a deterministic C# entry point instead, keeping compiled test assemblies byte-identical across checkout roots
and runners. Moving the contract to another release means certifying its targets in ETP first, then changing
Eternet.Testing.Build.Versions.props and releasing a new version of this package.
In this repository
Test projects import buildTransitive from source through Eternet.Testing.Build.InRepo.targets (from each
Directory.Build.targets), as they do with Eternet.TestPlanner.Build. The versions come from
Eternet.Testing.Build.Versions.props, which this package also uses. The Directory.Packages.props files repeat them
as literal PackageVersion entries, because ETP proves central package changes entry by entry only for literal
versions in a plain file; the build fails with ETTB004 when an entry differs from Versions.props.
ETP admits Eternet.Testing.Build.targets for build-output equivalence by its exact content
(BaseOwnershipBuildStageEdges.EquivalenceTargetContracts). An edit to that file needs its new hash there;
BaseOwnershipBuildStageEdgesTests fails otherwise.
| Product | Versions 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 was computed. 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. |
-
net8.0
- AwesomeAssertions (>= 9.4.0)
- Microsoft.Testing.Extensions.TrxReport (= 2.5.2)
- NSubstitute (>= 5.3.0)
- NSubstitute.Analyzers.CSharp (>= 1.0.17)
- xunit.v3.mtp-v2 (= 4.0.3)
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.0.0 | 52 | 11/26/2026 |