You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The analyzer for RegexGenerator generates the SYSLIB1041Multiple GeneratedRegex attribute diagnostic when there are multiple GeneratedRegexAttribute attributes
However, the GeneratedRegexAttribute is declared with AllowMultiple=false, which automatically generates the CS0579 (Duplicate 'attribute' attribute) diagnostic, even without precompilation, and the error is semantically "duplicated".
This behavior seems to be general now (checked Visual Studio, Visual Studio Code, LinqPad).
I would like to clarify why this was done?
My initial assumption was to detect design-time errors on the condition that analyzers are running. However, CS0579 doesn't let you write incorrectly and now design-time errors are shown in the IDE.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
The analyzer for RegexGenerator generates the
SYSLIB1041
Multiple GeneratedRegex attribute
diagnostic when there are multipleGeneratedRegexAttribute
attributesSource
However, the
GeneratedRegexAttribute
is declared withAllowMultiple=false
, which automatically generates theCS0579
(Duplicate 'attribute' attribute
) diagnostic, even without precompilation, and the error is semantically "duplicated".This behavior seems to be general now (checked
Visual Studio
,Visual Studio Code
,LinqPad
).I would like to clarify why this was done?
My initial assumption was to detect design-time errors on the condition that analyzers are running. However,
CS0579
doesn't let you write incorrectly and now design-time errors are shown in the IDE.Maybe I'm missing some additional uses?
Beta Was this translation helpful? Give feedback.
All reactions