-
Notifications
You must be signed in to change notification settings - Fork 1.4k
No error for Item update in target #2835
Copy link
Copy link
Open
Labels
Area: BuildCheckArea: EngineIssues impacting the core execution of targets and tasks.Issues impacting the core execution of targets and tasks.Breaking ChangeBuildCheck SuggestionSuggestion for a built in MSBuild analyzer. Label should be applied together with 'Area: BuildCheck'Suggestion for a built in MSBuild analyzer. Label should be applied together with 'Area: BuildCheck'Feature: Warning WavesWarnings to enable in opt-in waves. Formerly "strict mode".Warnings to enable in opt-in waves. Formerly "strict mode".
Milestone
Metadata
Metadata
Assignees
Labels
Area: BuildCheckArea: EngineIssues impacting the core execution of targets and tasks.Issues impacting the core execution of targets and tasks.Breaking ChangeBuildCheck SuggestionSuggestion for a built in MSBuild analyzer. Label should be applied together with 'Area: BuildCheck'Suggestion for a built in MSBuild analyzer. Label should be applied together with 'Area: BuildCheck'Feature: Warning WavesWarnings to enable in opt-in waves. Formerly "strict mode".Warnings to enable in opt-in waves. Formerly "strict mode".
Type
Fields
Give feedbackNo fields configured for issues without a type.
Ran into this while creating a workaround to patch an existing target (https://github.com/dotnet/cli/issues/6397#issuecomment-347989664) and naively using the item update syntax inside a target to update the link metadata of an item.
However, using the update syntax inside a target seems to update the metadata of all items, which is unexpected.
Steps to reproduce
Project file
Command line
Expected behavior
Error for
Updatesyntax not being allowed inside targetsor
Actual behavior
Environment data
dotnet msbuild /versionoutput: tested on 15.5.179.9764 and 15.6.12.27473 .OS info:
If applicable, version of the tool that invokes MSBuild (Visual Studio, dotnet CLI, etc): macOS 10.13.2,
dotnetcli