dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.17k stars 4.72k forks source link

Intermittent build failures caused by missing PlatformManifest.txt #61451

Open kg opened 2 years ago

kg commented 2 years ago

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.

ghost commented 2 years ago

Tagging subscribers to this area: @Anipik, @safern, @ViktorHofer See info in area-owners.md if you want to be subscribed.

Issue Details
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.
Author: kg
Assignees: -
Labels: `area-Infrastructure-libraries`, `untriaged`
Milestone: -
kg commented 2 years ago

If I do a regular build.sh instead of the build I'm trying to do, the wasm build I'm trying to do starts failing with this instead:

/home/kate/.nuget/packages/microsoft.dotnet.sharedframework.sdk/7.0.0-beta.21555.2/targets/sharedfx.targets(476,5): error : Assembly 'netstandard' is missing dependency 'System.Xml.ReaderWriter' [/home/kate/Projects/dotnet-runtime-wasm/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.sfxproj]
/home/kate/.nuget/packages/microsoft.dotnet.sharedframework.sdk/7.0.0-beta.21555.2/targets/sharedfx.targets(476,5): error : Assembly 'netstandard' is missing dependency 'System.Xml.XDocument' [/home/kate/Projects/dotnet-runtime-wasm/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.sfxproj]
/home/kate/.nuget/packages/microsoft.dotnet.sharedframework.sdk/7.0.0-beta.21555.2/targets/sharedfx.targets(476,5): error : Assembly 'netstandard' is missing dependency 'System.Xml.XmlSerializer' [/home/kate/Projects/dotnet-runtime-wasm/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.sfxproj]
/home/kate/.nuget/packages/microsoft.dotnet.sharedframework.sdk/7.0.0-beta.21555.2/targets/sharedfx.targets(476,5): error : Assembly 'netstandard' is missing dependency 'System.Xml.XPath.XDocument' [/home/kate/Projects/dotnet-runtime-wasm/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.sfxproj]
/home/kate/.nuget/packages/microsoft.dotnet.sharedframework.sdk/7.0.0-beta.21555.2/targets/sharedfx.targets(476,5): error : Assembly 'netstandard' is missing dependency 'System.Xml.XPath' [/home/kate/Projects/dotnet-runtime-wasm/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.sfxproj]
safern commented 2 years ago

cc: @jkoritzinsky any ideas?

jkoritzinsky commented 2 years ago

This might be due to the PlatformManifest caching in the SDK if they're switching between commits before and after us using the RC2 SDK. Other than that, I'm not sure what it would be

kg commented 2 years ago

I've been switching commits, yes. How do I properly flush things? Simply cleaning the repo and nuking my .nuget has not been sufficient. Eventually after an hour or two of building random targets and deleting things I tend to get it to work, but I haven't come up with a set of steps.

jkoritzinsky commented 2 years ago

Try deleting your .dotnet folder when you switch between commits. If you have the RC2 sdk in that folder, it will be used when you're on a commit that has RC1 mentioned in global.json.

kg commented 2 years ago

Try deleting your .dotnet folder when you switch between commits. If you have the RC2 sdk in that folder, it will be used when you're on a commit that has RC1 mentioned in global.json.

I've definitely been doing that, unfortunately. Is there anywhere else it might be tucking things?

safern commented 2 years ago

@jkoritzinsky I guess it could be some sort of switching in between branches and the RC2 SDK being present but the build scripts not having the switch to disable the SDK Targeting Pack cache and that's why it can't find the PlatformManifest.txt (probably cached from a previous test build?) when building the sources? Or even running dotnet build on a test project with the RC2 SDK and that caching the result on an MSBuild node, then switching to a branch that doesn't contain the env vars to disable caching on the build script and building again with the RC2 SDK because the .dotnet folder was persisted?

kg commented 2 years ago

Could a compiler server process be sticking around with bad state? Do I need to make sure to pkill something?

kg commented 2 years ago

The most recent time I hit this, it was from rebasing forward by a few dozen commits. I attempted this to fix it:

kate@reeir-debian2:~/Projects/dotnet-runtime-wasm$ pkill -9 dotnet
kate@reeir-debian2:~/Projects/dotnet-runtime-wasm$ rm -rf .dotnet
kate@reeir-debian2:~/Projects/dotnet-runtime-wasm$ rm -rf artifacts
kate@reeir-debian2:~/Projects/dotnet-runtime-wasm$ rm -rf ~/.nuget

And it worked. The pkill is the new part, so I think maybe the compiler server is caching old stuff.

safern commented 2 years ago

More than the compiler server I believe it is MSBuild nodes that are caching the Targeting Pack assets. You can disable this entirely in your machine by setting:

export DOTNETSDK_ALLOW_TARGETING_PACK_CACHING=0

That way we will disable that feature, that I'm 99% sure it is causing this problem as you are switching between branches and the error is coming from the SDK that added that feature.

kg commented 2 years ago

I'm now randomly getting this without even changing commits, I'll do a successful build and then later I do another and my repo no longer builds. Would this be caused in some cases by deleting the artifacts folder?

safern commented 2 years ago

It shouldn't. Did you try setting the env var I suggested?

Btw do you have a binlog to share?

kg commented 2 years ago

Will upload a binlog next time and try the env var. The set of 4 commands worked again, which is at least something.

adamsitnik commented 2 years ago

I am now getting the same error on Windows, after git clean -xfd:

```log C:\Program Files\dotnet\sdk\6.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(40,5): error NETSDK1042: Could not load PlatformManifest from 'D:\projects\runtime\artifacts\bin\microsoft.netcore.app.ref\data\PlatformManifest.txt' because it did not exist. [D:\projects\runtime\src\libraries\Microsoft.Extensions.DependencyInjection.Abstractions\ref\Microsoft.Extensions.DependencyInjection.Abstractions.csproj] C:\Program Files\dotnet\sdk\6.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(40,5): error NETSDK1042: Could not load PlatformManifest from 'D:\projects\runtime\artifacts\bin\microsoft.netcore.app.ref\data\PlatformManifest.txt' because it did not exist. [D:\projects\runtime\src\libraries\System.ComponentModel.Composition\ref\System.ComponentModel.Composition.csproj] C:\Program Files\dotnet\sdk\6.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(40,5): error NETSDK1042: Could not load PlatformManifest from 'D:\projects\runtime\artifacts\bin\microsoft.netcore.app.ref\data\PlatformManifest.txt' because it did not exist. [D:\projects\runtime\src\libraries\Microsoft.Win32.Registry.AccessControl\ref\Microsoft.Win32.Registry.AccessControl.csproj] C:\Program Files\dotnet\sdk\6.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(40,5): error NETSDK1042: Could not load PlatformManifest from 'D:\projects\runtime\artifacts\bin\microsoft.netcore.app.ref\data\PlatformManifest.txt' because it did not exist. [D:\projects\runtime\src\libraries\System.Runtime.Caching\ref\System.Runtime.Caching.csproj] C:\Program Files\dotnet\sdk\6.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(40,5): error NETSDK1042: Could not load PlatformManifest from 'D:\projects\runtime\artifacts\bin\microsoft.netcore.app.ref\data\PlatformManifest.txt' because it did not exist. [D:\projects\runtime\src\libraries\System.Formats.Cbor\ref\System.Formats.Cbor.csproj] C:\Program Files\dotnet\sdk\6.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(40,5): error NETSDK1042: Could not load PlatformManifest from 'D:\projects\runtime\artifacts\bin\microsoft.netcore.app.ref\data\PlatformManifest.txt' because it did not exist. [D:\projects\runtime\src\libraries\System.Security.Cryptography.Xml\ref\System.Security.Cryptography.Xml.csproj] C:\Program Files\dotnet\sdk\6.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(40,5): error NETSDK1042: Could not load PlatformManifest from 'D:\projects\runtime\artifacts\bin\microsoft.netcore.app.ref\data\PlatformManifest.txt' because it did not exist. [D:\projects\runtime\src\libraries\System.Security.Cryptography.Pkcs\ref\System.Security.Cryptography.Pkcs.csproj] C:\Program Files\dotnet\sdk\6.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(40,5): error NETSDK1042: Could not load PlatformManifest from 'D:\projects\runtime\artifacts\bin\microsoft.netcore.app.ref\data\PlatformManifest.txt' because it did not exist. [D:\projects\runtime\src\libraries\System.Speech\ref\System.Speech.csproj] C:\Program Files\dotnet\sdk\6.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(40,5): error NETSDK1042: Could not load PlatformManifest from 'D:\projects\runtime\artifacts\bin\microsoft.netcore.app.ref\data\PlatformManifest.txt' because it did not exist. [D:\projects\runtime\src\libraries\System.IO.Ports\ref\System.IO.Ports.csproj] C:\Program Files\dotnet\sdk\6.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(40,5): error NETSDK1042: Could not load PlatformManifest from 'D:\projects\runtime\artifacts\bin\microsoft.netcore.app.ref\data\PlatformManifest.txt' because it did not exist. [D:\projects\runtime\src\libraries\System.Data.Odbc\ref\System.Data.Odbc.csproj] C:\Program Files\dotnet\sdk\6.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(40,5): error NETSDK1042: Could not load PlatformManifest from 'D:\projects\runtime\artifacts\bin\microsoft.netcore.app.ref\data\PlatformManifest.txt' because it did not exist. [D:\projects\runtime\src\libraries\Microsoft.Win32.SystemEvents\ref\Microsoft.Win32.SystemEvents.csproj] C:\Program Files\dotnet\sdk\6.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(40,5): error NETSDK1042: Could not load PlatformManifest from 'D:\projects\runtime\artifacts\bin\microsoft.netcore.app.ref\data\PlatformManifest.txt' because it did not exist. [D:\projects\runtime\src\libraries\System.Diagnostics.PerformanceCounter\ref\System.Diagnostics.PerformanceCounter.csproj] C:\Program Files\dotnet\sdk\6.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(40,5): error NETSDK1042: Could not load PlatformManifest from 'D:\projects\runtime\artifacts\bin\microsoft.netcore.app.ref\data\PlatformManifest.txt' because it did not exist. [D:\projects\runtime\src\libraries\System.Numerics.Tensors\ref\System.Numerics.Tensors.csproj] C:\Program Files\dotnet\sdk\6.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(40,5): error NETSDK1042: Could not load PlatformManifest from 'D:\projects\runtime\artifacts\bin\microsoft.netcore.app.ref\data\PlatformManifest.txt' because it did not exist. [D:\projects\runtime\src\libraries\System.DirectoryServices.Protocols\ref\System.DirectoryServices.Protocols.csproj] C:\Program Files\dotnet\sdk\6.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(40,5): error NETSDK1042: Could not load PlatformManifest from 'D:\projects\runtime\artifacts\bin\microsoft.netcore.app.ref\data\PlatformManifest.txt' because it did not exist. [D:\projects\runtime\src\libraries\System.ServiceModel.Syndication\ref\System.ServiceModel.Syndication.csproj] C:\Program Files\dotnet\sdk\6.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(40,5): error NETSDK1042: Could not load PlatformManifest from 'D:\projects\runtime\artifacts\bin\microsoft.netcore.app.ref\data\PlatformManifest.txt' because it did not exist. [D:\projects\runtime\src\libraries\System.Security.Permissions\ref\System.Security.Permissions.csproj] C:\Program Files\dotnet\sdk\6.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(40,5): error NETSDK1042: Could not load PlatformManifest from 'D:\projects\runtime\artifacts\bin\microsoft.netcore.app.ref\data\PlatformManifest.txt' because it did not exist. [D:\projects\runtime\src\libraries\Microsoft.Extensions.Configuration.Abstractions\ref\Microsoft.Extensions.Configuration.Abstractions.csproj] ```

Edit 1: after:

$env:DOTNETSDK_ALLOW_TARGETING_PACK_CACHING=0

I am getting only one error:

C:\Program Files\dotnet\sdk\6.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(40,5): error NETSDK1042: Could not load PlatformManifest from 'D:\projects\runtime\artifacts\bin\microsoft.netcore.app.ref\data\PlatformManifest.txt' because it did not exist. [D:\projects\runtime\src\libraries\System.Net.Quic\ref\System.Net.Quic.cspro

Edit 2: after taskkill /IM "dotnet.exe" /F I was able to build everything without a single error

safern commented 2 years ago

I think this is becoming an issue in between using dotnet build on source projects where the caching feature is not disabled as the env var is only set on the build scripts and then using dotnet build or dotnet test on a test project where the platform manifest is needed.

@rainersigwald is it possible that we can also support an MSBuild property to disable the targeting pack caching?

rainersigwald commented 2 years ago

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 . . .

rainersigwald commented 2 years ago

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 with MSBuild.dll in 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.rsp with -nodeReuse:false in 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.

eerhardt commented 2 years ago

I've hit this as well when switching from the main to release/6.0 branch.

kg commented 2 years ago

In the long run it could make sense to have a special command that just specifically kills any msbuild compiler server processes that have cached info for a given repository. We could do that once at the start of every build for runtime so that this problem is automatically avoided (we'll only have to start a few workers, right?), or perhaps only do it if the repo SHA has changed.

deeprobin commented 2 years ago

I can verify this build failure.

C:\Program Files\dotnet\sdk\6.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(40,5): error NETSDK1042: PlatformManifest konnte nicht von "E:\external\dotnet\runtime\artifacts\bin\microsoft.netcore.app.ref\data\PlatformManifest.txt" geladen werden, weil es nicht vorhanden ist. [E:\external\dotnet\runtime\src\libraries\Microsoft.Extensions.DependencyInjection.Abstractions\ref\Microsoft.Extensions.DependencyInjection.Abstractions.csproj]
C:\Program Files\dotnet\sdk\6.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(40,5): error NETSDK1042: PlatformManifest konnte nicht von "E:\external\dotnet\runtime\artifacts\bin\microsoft.netcore.app.ref\data\PlatformManifest.txt" geladen werden, weil es nicht vorhanden ist. [E:\external\dotnet\runtime\src\libraries\Microsoft.Extensions.Logging.Abstractions\ref\Microsoft.Extensions.Logging.Abstractions.csproj]
C:\Program Files\dotnet\sdk\6.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(40,5): error NETSDK1042: PlatformManifest konnte nicht von "E:\external\dotnet\runtime\artifacts\bin\microsoft.netcore.app.ref\data\PlatformManifest.txt" geladen werden, weil es nicht vorhanden ist. [E:\external\dotnet\runtime\src\libraries\Microsoft.Extensions.FileProviders.Composite\ref\Microsoft.Extensions.FileProviders.Composite.csproj]
C:\Program Files\dotnet\sdk\6.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(40,5): error NETSDK1042: PlatformManifest konnte nicht von "E:\external\dotnet\runtime\artifacts\bin\microsoft.netcore.app.ref\data\PlatformManifest.txt" geladen werden, weil es nicht vorhanden ist. [E:\external\dotnet\runtime\src\libraries\System.Drawing.Common\ref\System.Drawing.Common.csproj]
C:\Program Files\dotnet\sdk\6.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(40,5): error NETSDK1042: PlatformManifest konnte nicht von "E:\external\dotnet\runtime\artifacts\bin\microsoft.netcore.app.ref\data\PlatformManifest.txt" geladen werden, weil es nicht vorhanden ist. [E:\external\dotnet\runtime\src\libraries\System.DirectoryServices.AccountManagement\ref\System.DirectoryServices.AccountManagement.csproj]
C:\Program Files\dotnet\sdk\6.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(40,5): error NETSDK1042: PlatformManifest konnte nicht von "E:\external\dotnet\runtime\artifacts\bin\microsoft.netcore.app.ref\data\PlatformManifest.txt" geladen werden, weil es nicht vorhanden ist. [E:\external\dotnet\runtime\src\libraries\System.Formats.Cbor\ref\System.Formats.Cbor.csproj]
C:\Program Files\dotnet\sdk\6.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(40,5): error NETSDK1042: PlatformManifest konnte nicht von "E:\external\dotnet\runtime\artifacts\bin\microsoft.netcore.app.ref\data\PlatformManifest.txt" geladen werden, weil es nicht vorhanden ist. [E:\external\dotnet\runtime\src\libraries\System.IO.Packaging\ref\System.IO.Packaging.csproj]
C:\Program Files\dotnet\sdk\6.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(40,5): error NETSDK1042: PlatformManifest konnte nicht von "E:\external\dotnet\runtime\artifacts\bin\microsoft.netcore.app.ref\data\PlatformManifest.txt" geladen werden, weil es nicht vorhanden ist. [E:\external\dotnet\runtime\src\libraries\System.IO.Pipelines\ref\System.IO.Pipelines.csproj]
C:\Program Files\dotnet\sdk\6.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(40,5): error NETSDK1042: PlatformManifest konnte nicht von "E:\external\dotnet\runtime\artifacts\bin\microsoft.netcore.app.ref\data\PlatformManifest.txt" geladen werden, weil es nicht vorhanden ist. [E:\external\dotnet\runtime\src\libraries\System.Resources.Extensions\ref\System.Resources.Extensions.csproj]
C:\Program Files\dotnet\sdk\6.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(40,5): error NETSDK1042: PlatformManifest konnte nicht von "E:\external\dotnet\runtime\artifacts\bin\microsoft.netcore.app.ref\data\PlatformManifest.txt" geladen werden, weil es nicht vorhanden ist. [E:\external\dotnet\runtime\src\libraries\System.Numerics.Tensors\ref\System.Numerics.Tensors.csproj]
C:\Program Files\dotnet\sdk\6.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(40,5): error NETSDK1042: PlatformManifest konnte nicht von "E:\external\dotnet\runtime\artifacts\bin\microsoft.netcore.app.ref\data\PlatformManifest.txt" geladen werden, weil es nicht vorhanden ist. [E:\external\dotnet\runtime\src\libraries\System.Security.Cryptography.ProtectedData\ref\System.Security.Cryptography.ProtectedData.csproj]
C:\Program Files\dotnet\sdk\6.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(40,5): error NETSDK1042: PlatformManifest konnte nicht von "E:\external\dotnet\runtime\artifacts\bin\microsoft.netcore.app.ref\data\PlatformManifest.txt" geladen werden, weil es nicht vorhanden ist. [E:\external\dotnet\runtime\src\libraries\System.ServiceModel.Syndication\ref\System.ServiceModel.Syndication.csproj]
C:\Program Files\dotnet\sdk\6.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(40,5): error NETSDK1042: PlatformManifest konnte nicht von "E:\external\dotnet\runtime\artifacts\bin\microsoft.netcore.app.ref\data\PlatformManifest.txt" geladen werden, weil es nicht vorhanden ist. [E:\external\dotnet\runtime\src\libraries\Microsoft.Extensions.Configuration.Ini\ref\Microsoft.Extensions.Configuration.Ini.csproj]
C:\Program Files\dotnet\sdk\6.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(40,5): error NETSDK1042: PlatformManifest konnte nicht von "E:\external\dotnet\runtime\artifacts\bin\microsoft.netcore.app.ref\data\PlatformManifest.txt" geladen werden, weil es nicht vorhanden ist. [E:\external\dotnet\runtime\src\libraries\Microsoft.Extensions.Configuration.Json\ref\Microsoft.Extensions.Configuration.Json.csproj]

I can verify Adams workaround using taskkill /IM "dotnet.exe" /F.

dotnet build-server shutdown might also work (but I haven't tested this - credits @Wraith2)

ViktorHofer commented 2 years ago

Why not just generate the PlatformManifest early enough so that the environment variable isn't necessary in the first place?

ViktorHofer commented 1 year ago

The remaining work is to make sure the platform manifest is generated as part of the "libs.sfx" subset, not in "libs.pretest" which runs after OOBs are built, and remove the environment variable that disabled changing.

Not important atm, moving to Future.