What problem does it solve?
Static Web Assets tests in the .NET SDK fail with "generated manifest should match the expected baseline" errors whenever build output legitimately changes, and manually updating the embedded baseline JSON files is error-prone because the test DLL must be rebuilt before validation works.
Core Features & Use Cases
- Baseline Regeneration Workflow: Step-by-step PowerShell procedure using the ASPNETCORE_TEST_BASELINES environment variable to rewrite baseline JSON files from actual build output.
- Embedded Resource Handling: Explains why the test project must be rebuilt after regeneration, since baselines are compiled into the test DLL via Assembly.GetManifestResourceStream.
- Use Case: After changing Razor SDK build logic, run the affected StaticWebAssets tests with the regeneration flag, rebuild the test project, then validate without the flag to confirm the new baselines pass.
Quick Start
Regenerate the failing Static Web Assets test baselines and validate that the updated tests pass.