You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
_WriteBuildWasmBootJsonFile is not incremental #129280
Fails with error Building target "_WriteBuildWasmBootJsonFile" completely.
In the binlog I can also see Input file "obj\Debug\net11.0\blazor.build.boot-extension.json" is newer than output file "C:\Users\janjones\source\playground\BlazorWasmApp1\obj\Debug\net11.0\dotnet.js".
Regression?
Yes, incremental builds worked in .NET 11 Preview 4. (I have dotnet build /question check in my CI, maybe you should add tests for it too since I'm hitting this regularly.)
Adding evidence from a downstream variant of this same bug, surfaced by a different test path.
Investigating WBT Wasm.Build.Tests.WasmTemplateTests.TypeScriptDefinitionsCopiedToWwwrootOnBuild(config: Debug, emitTypeScriptDts: True) failure on PR #129454 (build 1470806, workitem WBT-NoWebcil-MONO-ST-Wasm.Build.Tests.WasmTemplateTests). The reported failing target there is one level downstream:
Building target "_BuildCopyStaticWebAssetsPreserveNewest" partially, because some output files are out of date with respect to their input files.
[_BuildStaticWebAssetsPreserveNewest:
Input = obj\Debug\net11.0\compressed\{hash}-{0}-{fp}-{fp}.gz,
Output = bin\Debug\net11.0\wwwroot\_framework\dotnet.{fp}.js.gz]
Input file is newer than output file.
Chain of causation (binlog-verified)
_WriteBuildWasmBootJsonFile runs GenerateWasmBootJson (uses ArtifactWriter.PersistFileIfChanged — preserves old mtime on unchanged content) followed by <Touch Files="$(_WasmBuildBootJsonPath)" />. The Touch bumps obj/.../dotnet.js mtime to current.
Same obj/.../dotnet.js is a source for the StaticWebAssets compression pipeline (GenerateBuildCompressedStaticWebAssets → GZipCompress task in dotnet/sdksrc/StaticWebAssetsSdk/Tasks/Compression/GZipCompress.cs).
In the -question rebuild, _WriteBuildWasmBootJsonFile correctly skips (UpToDate). But GenerateBuildCompressedStaticWebAssets has no Inputs=/Outputs= declaration, so its body runs unconditionally. GZipCompress's internal check (input.mtime < output.mtime strict) treats equal/newer as "compress" and re-writes obj/.../{0}.gz:
Compressing 'obj\Debug\net11.0\dotnet.js' because file is newer than
'obj\Debug\net11.0\compressed\{hash}-{0}-{fp}-{fp}.gz'.
This is the symmetric symptom to what you reported: same root (<Touch> on the boot JSON, introduced by #125367), just the cascade extending one target further into the StaticWebAssets pipeline. Same fix addresses both.
Historical context
Worth noting: PR #118637 (Aug 2025, "Override boot config only when the content changes") was originally added specifically to fix the _BuildCopyStaticWebAssetsPreserveNewest symptom in dotnet/aspnetcore#63207 — by introducing PersistFileIfChanged so dotnet.js mtime would only change on content change. #125367's <Touch> undid that protection.
Fix
PR #129591 — touch a separate wasm-bootjson-{build,publish}.complete.stamp instead of the boot JSON itself, and use the stamp as the target's Outputs=. MSBuild's I/O check on the boot-JSON target works correctly via the stamp, while the boot JSON's mtime stays content-derived (restoring #118637's invariant for downstream consumers).
Both build and publish targets get the same treatment in that PR.
Activity
dotnet-policy-service commentedon Jun 11, 2026
Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara
See info in area-owners.md if you want to be subscribed.
maraf commentedon Jun 12, 2026
Related to #125367
lewing commentedon Jun 18, 2026
Adding evidence from a downstream variant of this same bug, surfaced by a different test path.
Investigating WBT
Wasm.Build.Tests.WasmTemplateTests.TypeScriptDefinitionsCopiedToWwwrootOnBuild(config: Debug, emitTypeScriptDts: True)failure on PR #129454 (build 1470806, workitemWBT-NoWebcil-MONO-ST-Wasm.Build.Tests.WasmTemplateTests). The reported failing target there is one level downstream:Chain of causation (binlog-verified)
_WriteBuildWasmBootJsonFilerunsGenerateWasmBootJson(usesArtifactWriter.PersistFileIfChanged— preserves old mtime on unchanged content) followed by<Touch Files="$(_WasmBuildBootJsonPath)" />. The Touch bumpsobj/.../dotnet.jsmtime to current.obj/.../dotnet.jsis a source for the StaticWebAssets compression pipeline (GenerateBuildCompressedStaticWebAssets→GZipCompresstask indotnet/sdksrc/StaticWebAssetsSdk/Tasks/Compression/GZipCompress.cs).-questionrebuild,_WriteBuildWasmBootJsonFilecorrectly skips (UpToDate). ButGenerateBuildCompressedStaticWebAssetshas noInputs=/Outputs=declaration, so its body runs unconditionally.GZipCompress's internal check (input.mtime < output.mtimestrict) treats equal/newer as "compress" and re-writesobj/.../{0}.gz:.gznow has a fresh mtime, exceeding thebin/.gz(last written during build WIP: repo consolidation scouting kick-off - make clr build locally on Windows #1's Copy)._BuildCopyStaticWebAssetsPreserveNewestsees its declared input newer than its declared output →-questionfails.This is the symmetric symptom to what you reported: same root (
<Touch>on the boot JSON, introduced by #125367), just the cascade extending one target further into the StaticWebAssets pipeline. Same fix addresses both.Historical context
Worth noting: PR #118637 (Aug 2025, "Override boot config only when the content changes") was originally added specifically to fix the
_BuildCopyStaticWebAssetsPreserveNewestsymptom in dotnet/aspnetcore#63207 — by introducingPersistFileIfChangedsodotnet.jsmtime would only change on content change. #125367's<Touch>undid that protection.Fix
PR #129591 — touch a separate
wasm-bootjson-{build,publish}.complete.stampinstead of the boot JSON itself, and use the stamp as the target'sOutputs=. MSBuild's I/O check on the boot-JSON target works correctly via the stamp, while the boot JSON's mtime stays content-derived (restoring #118637's invariant for downstream consumers).Both build and publish targets get the same treatment in that PR.
Note
This comment was AI/Copilot-generated.
[browser] Wasm boot JSON: touch a stamp, not the boot JSON itself (fix …
[browser] Wasm boot JSON: touch a stamp, not the boot JSON itself (fix …