dotnet/msbuild

CodeTaskFactory error on missing attributes does not contain element name

Open

#2 072 ouverte le 7 mai 2017

Voir sur GitHub
 (8 commentaires) (1 réaction) (0 assignés)C# (1 364 forks)batch import
User Experiencehelp wantedtriaged

Métriques du dépôt

Stars
 (5 062 stars)
Métriques de merge PR
 (Merge moyen 11j 7h) (125 PRs mergées en 30 j)

Description

When using CodeTaskFactory, if a Reference element is missing the Include attribute, or a Using element is missing the Namespace attribute, an error is printed about an empty attribute value.

This error isn't great for a few reasons

  1. It doesn't say which element the attribute is on
  2. It says "The "Include" attribute has been set but is empty" even when it's missing
  3. It's emitted at the point the task is used, not declared, so the message about the Include attribute is easily confused for referring to the Items passed to the task

Guide contributeur