Skip to content
This repository was archived by the owner on Nov 10, 2026. It is now read-only.

fix: resolve the NuGet packages of a library for its public API - #54

Merged
vbreuss merged 1 commit into
mainfrom
fix/public-api-package-references
Oct 18, 2026
Merged

vbreuss merged 1 commit into
mainfrom
fix/public-api-package-references

Conversation

@vbreuss

@vbreuss vbreuss commented Oct 18, 2026

Copy link
Copy Markdown
Member

The build output of a library does not contain its package dependencies, so generating the public API from its file failed when the library references a newer package than the tests bring along, e.g. the netstandard2.0 build referencing System.Text.Json 10.0 while the tests run on net8.0. The API tests of several aweXpect repositories needed test-only package references to work around it.

The <assembly>.deps.json next to the library lists its packages with their exact versions, paths and runtime assets. These assemblies are now read from the global packages folder (NUGET_PACKAGES, or else ~/.nuget/packages) as a fallback: they are considered after the existing sources and only replace an assembly that is missing or found in a lower version. Without a deps.json, or when a package is not in the cache, the behaviour and the exception are unchanged; the exception now also hints at restoring the packages.

The build output of a library does not contain its package dependencies, so generating the public API from its file failed when the library references a newer package than the tests bring along, e.g. the netstandard2.0 build referencing System.Text.Json 10.0 while the tests run on net8.0. The API tests of several aweXpect repositories needed test-only package references to work around it.

The `<assembly>.deps.json` next to the library lists its packages with their exact versions, paths and runtime assets. These assemblies are now read from the global packages folder (`NUGET_PACKAGES`, or else `~/.nuget/packages`) as a fallback: they are considered after the existing sources and only replace an assembly that is missing or found in a lower version. Without a `deps.json`, or when a package is not in the cache, the behaviour and the exception are unchanged; the exception now also hints at restoring the packages.
@vbreuss vbreuss self-assigned this Oct 18, 2026
@vbreuss
vbreuss merged commit 59a0764 into main Oct 18, 2026
11 checks passed
@vbreuss
vbreuss deleted the fix/public-api-package-references branch October 18, 2026 09:12
@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

👽 Mutation Results

Mutation testing badge

aweXpect.Snapshots

Details
File Score Killed Survived Timeout No Coverage Ignored Compile Errors Runtime Errors Total Detected Total Undetected Total Mutants

The final mutation score is NaN%

Coverage Thresholds: high:80 low:60 break:0

@github-actions

Copy link
Copy Markdown

🚀 Benchmark Results

Details

BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.5 LTS (Noble Numbat)
AMD EPYC 7763 2.45GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.303
[Host] : .NET 8.0.32 (8.0.32, 8.0.3226.50405), X64 RyuJIT x86-64-v3
DefaultJob : .NET 8.0.32 (8.0.32, 8.0.3226.50405), X64 RyuJIT x86-64-v3

Method Mean Error StdDev Gen0 Allocated
Dummy_aweXpect 147.8 ns 1.75 ns 1.64 ns 0.0229 384 B

@github-actions

Copy link
Copy Markdown

This is addressed in release v0.4.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant