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

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 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. 
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.0.0 52 11/26/2026