dotnet / dotnet/msbuild

Better error message for malformed item transformations

Open
#333 2 comments 0 reactions 0 assignees View on GitHub
help wanted triaged User Experience
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 6h
Merged PRs (30d)
139

Description

A definition of an item `ThisItem`

```

```

Followed by a usage of `ThisItem` of the form:

`%(ThisItem.FullPath)`

Fails with the error: _error MSB4023: Cannot evaluate the item metadata "%(FullPath)". The item metadata "%(FullPath)" cannot be applied to the path "@(AnotherItem->c:\projects\msbuild\bin\Debug-NetCore\Windows_NT_Deployment_Test)". Illegal characters in path"._

The error is currently caught when the malformed item is used, not when the malformed item is created. Instead, the error should be caught at item definition with a text mentioning the missing single quotes (correct definition is "@(AnotherItem->'$(APath)\%(Filename)%(Extension)')")

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.