runtime: Intermittent build failures caused by missing PlatformManifest.txt
Over the last few weeks I’ve intermittently had my checkouts enter a bad state where builds always fail with these errors:
/home/kate/Projects/dotnet-runtime-wasm/.dotnet/sdk/6.0.100-rc.2.21505.57/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.ConflictResolution.targets(40,5): error NETSDK1042: Could not load PlatformManifest from '/home/kate/Projects/dotnet-runtime-wasm/artifacts/bin/microsoft.netcore.app.ref/data/PlatformManifest.txt' because it did not exist. [/home/kate/Projects/dotnet-runtime-wasm/src/libraries/System.Diagnostics.PerformanceCounter/ref/System.Diagnostics.PerformanceCounter.csproj]
/home/kate/Projects/dotnet-runtime-wasm/.dotnet/sdk/6.0.100-rc.2.21505.57/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.ConflictResolution.targets(40,5): error NETSDK1042: Could not load PlatformManifest from '/home/kate/Projects/dotnet-runtime-wasm/artifacts/bin/microsoft.netcore.app.ref/data/PlatformManifest.txt' because it did not exist. [/home/kate/Projects/dotnet-runtime-wasm/src/libraries/System.Numerics.Tensors/ref/System.Numerics.Tensors.csproj]
/home/kate/Projects/dotnet-runtime-wasm/.dotnet/sdk/6.0.100-rc.2.21505.57/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.ConflictResolution.targets(40,5): error NETSDK1042: Could not load PlatformManifest from '/home/kate/Projects/dotnet-runtime-wasm/artifacts/bin/microsoft.netcore.app.ref/data/PlatformManifest.txt' because it did not exist. [/home/kate/Projects/dotnet-runtime-wasm/src/libraries/System.Threading.AccessControl/ref/System.Threading.AccessControl.csproj]
/home/kate/Projects/dotnet-runtime-wasm/.dotnet/sdk/6.0.100-rc.2.21505.57/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.ConflictResolution.targets(40,5): error NETSDK1042: Could not load PlatformManifest from '/home/kate/Projects/dotnet-runtime-wasm/artifacts/bin/microsoft.netcore.app.ref/data/PlatformManifest.txt' because it did not exist. [/home/kate/Projects/dotnet-runtime-wasm/src/libraries/System.Windows.Extensions/ref/System.Windows.Extensions.csproj]
/home/kate/Projects/dotnet-runtime-wasm/.dotnet/sdk/6.0.100-rc.2.21505.57/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.ConflictResolution.targets(40,5): error NETSDK1042: Could not load PlatformManifest from '/home/kate/Projects/dotnet-runtime-wasm/artifacts/bin/microsoft.netcore.app.ref/data/PlatformManifest.txt' because it did not exist. [/home/kate/Projects/dotnet-runtime-wasm/src/libraries/Microsoft.Extensions.FileProviders.Physical/ref/Microsoft.Extensions.FileProviders.Physical.csproj]
I’m using the repo-local .dotnet folder to build and nuking that folder doesn’t fix it, neither does nuking the .nuget in my homedir. git clean -xffd also doesn’t fix it. I’m not actually sure how I fixed it last time but now my checkout seems to be busted for good.
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 2
- Comments: 23 (23 by maintainers)
Let’s have that discussion in https://github.com/dotnet/sdk/issues/22834.
@kg the cache in question is in an MSBuild worker process so
pkill -9 dotnet(or even the subset of them that are running a command line withMSBuild.dllin it) should be all you need (and faster than deleting/regenerating.dotnet).Another possibility for a workaround that could be checked in is a
Directory.Build.rspwith-nodeReuse:falsein it. That would slow down builds (every build has to pay process-creation overhead for MSBuild workers and starts with clean memory caches) but should eliminate this caching problem.I can verify this build failure.
I can verify Adams workaround using
taskkill /IM "dotnet.exe" /F.dotnet build-server shutdownmight also work (but I haven’t tested this - credits @Wraith2)Yeah, we can add an input to the task and pass a property through to it. It would require an SDK update. @marcpopMSFT would you have any objection to adding such a feature to an SDK task when the only expected consumer is the runtime build? I personally don’t . . .
I am now getting the same error on Windows, after
git clean -xfd:Edit 1: after:
I am getting only one error:
Edit 2: after
taskkill /IM "dotnet.exe" /FI was able to build everything without a single error