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
AD0001 Analyzer 'StyleCop.Analyzers.DocumentationRules.SA1649FileNameMustMatchTypeName' threw an exception of type 'System.ArgumentException' with message 'Unhandled declaration kind: RecordDeclaration'.
#3359
Closed
linkdotnet opened this issue
Jun 30, 2021
· 2 comments
With the latest StyleCop.Analyzers version (1.1.118) SA1649 fires an ArgumentException when analyzing records in NET5 (C# 9).
Error
AD0001 Analyzer 'StyleCop.Analyzers.DocumentationRules.SA1649FileNameMustMatchTypeName' threw an exception of type 'System.ArgumentException' with message 'Unhandled declaration kind: RecordDeclaration'.
Steps to reproduce
Create a new project (for example Blazor Server App) with .NET5 as target framework
Install dependency to StyleCop.Analyzers
Change the WeatherData class to a record like below (or just create a new record class)
With the latest StyleCop.Analyzers version (1.1.118) SA1649 fires an
ArgumentException
when analyzing records in NET5 (C# 9).Error
Steps to reproduce
For a complete example checkout: https://github.com/linkdotnet/StyleCopError
Clone / download the repo and press compile.
The text was updated successfully, but these errors were encountered: