Open
Description
Steps to reproduce
<Project>
<ItemGroup>
<Item Include="$(MSBuildThisFile)" />
</ItemGroup>
<Target Name="_" Inputs="@(Item)" Outputs="@(Item->'%(Identity)');@(Item->'%(Identity)')" />
</Project>
Expected behavior
Project file error is reported.
Actual behavior
Internal error is reported.
MSBUILD : error MSB1025: An internal failure occurred while running MSBuild.
Microsoft.Build.Shared.InternalErrorException: MSB0001: Internal MSBuild Error: ItemVectorPartition already contains a vector for items with the expression '@(Item->'%(Identity)')'
at Microsoft.Build.Shared.ErrorUtilities.ThrowInternalError(String message, Object[] args)
at Microsoft.Build.BackEnd.TargetUpToDateChecker.SeparateItemVectorsFromDiscreteItems(SemiColonTokenizer items, ItemBucket bucket, Dictionary`2& itemVectors, Dictionary`2 itemVectorTransforms, Dictionary`2& discreteItems, ElementLocation elementLocation)
at Microsoft.Build.BackEnd.TargetUpToDateChecker.ParseTargetInputOutputSpecifications(ItemBucket bucket, Dictionary`2& itemVectorsInTargetInputs, Dictionary`2& itemVectorTransformsInTargetInputs, Dictionary`2& discreteItemsInTargetInputs, Dictionary`2& itemVectorsInTargetOutputs, Dictionary`2& discreteItemsInTargetOutputs, List`1& targetOutputItemSpecs)
at Microsoft.Build.BackEnd.TargetUpToDateChecker.PerformDependencyAnalysis(ItemBucket bucket, ItemDictionary`1& changedTargetInputs, ItemDictionary`1& upToDateTargetInputs)
at Microsoft.Build.BackEnd.TargetEntry.ExecuteTarget(ITaskBuilder taskBuilder, BuildRequestEntry requestEntry, ProjectLoggingContext projectLoggingContext, CancellationToken cancellationToken)
at Microsoft.Build.BackEnd.TargetBuilder.ProcessTargetStack(ITaskBuilder taskBuilder)
at Microsoft.Build.BackEnd.TargetBuilder.BuildTargets(ProjectLoggingContext loggingContext, BuildRequestEntry entry, IRequestBuilderCallback callback, String[] targetNames, Lookup baseLookup, CancellationToken cancellationToken)
at Microsoft.Build.BackEnd.RequestBuilder.BuildProject()
at Microsoft.Build.BackEnd.RequestBuilder.BuildAndReport()
at Microsoft.Build.BackEnd.RequestBuilder.RequestThreadProc(Boolean setThreadParameters)
Environment data
Microsoft (R) Build Engine version 16.4.0-preview-19529-02+0c507a29b for .NET Core