Open lateralusX opened 10 months ago
Thanks @lateralusX, would you mind opening a PR into Arcade to fix this? Thanks!
Note that this isn't a warning or error, it's just an informational message. Still, it would be good to do something to avoid the message.
Looks like msbuild enabled additional warning in 17.7.2 that shows up when building an in-tree project in dotnet/runtime:
...\.nuget\packages\microsoft.dotnet.build.tasks.targetframework\8.0.0-beta.23422.1\buildMultiTargeting\Microsoft.DotNet.Build.Tasks.TargetFramework.targets(54,49): message : MSB4120: Item 'InnerBuildProjectsWithBestTargetFramework' definition within target references itself via (qualified or unqualified) metadatum 'Identity'. This can lead to unintended expansion and cross-applying of pre-existing items. More info: https://aka.ms/msbuild/metadata-self-ref ...
More info here, https://learn.microsoft.com/en-us/visualstudio/msbuild/msbuild-batching?view=vs-2022#item-self-referencing-metadata-inside-of-a-target
Issue is located here, https://github.com/dotnet/arcade/blob/main/src/Microsoft.DotNet.Build.Tasks.TargetFramework/src/buildMultiTargeting/Microsoft.DotNet.Build.Tasks.TargetFramework.targets#L53
changing
%(Identify)
->%(_BestTargetFramework.Identity)
resolves the warning.dotnet/runtime:
.net8 RC1
msbuild:
MSBuild version 17.7.2+d6990bcfa for .NET Framework 17.7.2.37605