dotnet / dotnet/msbuild

Duplicate item transform in target Outputs should not be reported as Internal Error

Open
#4,942 1 comment 0 reactions 0 assignees View on GitHub
Area: Language bug triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 8h
Merged PRs (30d)
141

Description

### Steps to reproduce

```proj



```

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.