public static class AssemblyConfigurationWhich configuration an assembly was built in, read from the assembly itself — the one thing about its surface that this tool cannot see in the surface.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
⚠ A baseline is a promise about a Release package, and --update will happily write a Debug one down instead. CheckApi hard-codes Release for a reason it states at length; the tool underneath it takes a path and believes whatever is at the end of it. The two configurations genuinely disagree — the engine has public const bool feature flags (LeakTracker.IsSupported, JobScheduler.SafetyChecksEnabled, UiDiagnostics.RecordsRegions) whose values are #if DEBUG, and a const's value is part of what ApiSurfaceReader prints. So a regeneration run against bin/Debug rewrites one line in a diff of fifty as = true -> bool, and the gate fails on master afterwards.
It failed that way twice in one session — the inner-loop escape from a gate an agent is forbidden to run is exactly this tool, and bin/Debug is what a developer has lying around. The advice was to read the diff, which is right and is also how this edit survives: it reads as noise. So the tool refuses instead of hoping, which makes it honest about the one input it was previously unable to question.
Fields and properties (1)
public const string BaselineThe configuration a baseline is a promise about.
Methods (3)
public static string? Read(string assemblyPath)The value of the assembly's AssemblyConfigurationAttribute, or when it carries none — which is a different answer from "Debug" and is treated as one.
public static bool IsBaseline(string? configuration)Whether a configuration read by Read may be written into a baseline.
public static string Describe(string? configuration)How a configuration is named in a log line, including when there is none.
Used by (1)
- AssemblyConfigurationTestsVixen.ApiCheck.Tests