The "ProcessFrameworkReferences" task failed unexpectedly. System.ArgumentNullException: Value cannot be null. (Parameter 'key')
- Dominant language
- C#
- Stars
- 3.2k
- Forks
- 1.3k
- PR merge metrics
- PR metrics pending
Description
### Describe the bug
Build fails with:
```
The "ProcessFrameworkReferences" task failed unexpectedly.
System.ArgumentNullException: Value cannot be null. (Parameter 'key')
at System.Collections.Generic.Dictionary`2.FindValue(TKey key)
at System.Collections.Generic.Dictionary`2.ContainsKey(TKey key)
at Microsoft.NET.Build.Tasks.NuGetUtils.GetBestMatchingRidWithExclusion(RuntimeGraph runtimeGraph, String runtimeIdentifier, IEnumerable`1 runtimeIdentifiersToExclude, IEnumerable`1 availableRuntimeIdentifiers, Boolean& wasInGraph)
at Microsoft.NET.Build.Tasks.ProcessFrameworkReferences.AddToolPack(ToolPackType toolPackType, Version normalizedTargetFrameworkVersion, List`1 packagesToDownload, List`1 implicitPackageReferences)
at Microsoft.NET.Build.Tasks.ProcessFrameworkReferences.ExecuteCore()
at Microsoft.NET.Build.Tasks.TaskBase.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(TaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask)
```
### To Reproduce
```shell
git clone https://github.com/dotnet/macios macios
cd macios
git checkout darc-net10.0-3e2d6574-3e2e-4233-aab9-99cf75de33e4
git reset --hard e583c4fe8da7b92c0bc9067d0796ba708401fc8c
make reset
./configure --disable-all-platforms --enable-macos
make all -j8
make install -j8
./builds/downloads/dotnet/dotnet build tests/monotouch-test/dotnet/macOS/monotouch-test.csproj /p:PublishAot=true
```
Binlog:
[msbuild.binlog.zip](https://github.com/user-attachments/files/22212051/msbuild.binlog.zip)
### Further technical details
This is a regression in .NET 10 RC 2, it's happening in this maestro bump: https://github.com/dotnet/macios/pull/23751
Looks like https://github.com/dotnet/sdk/pull/50455 is recent and in the area, CC @baronfel
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.