Closed van800 closed 1 year ago
Hi @van800 Could you please attach the stack trace? Also, please specify the extension version. Is this only happens in the EAP or the stable version is affected too?
StackTraceString = “ at JetBrains.ReSharper.Psi.ConstantValue.get_StringValue() at ReSharper.Structured.Logging.Analyzer.PropertiesNamingAnalyzer.CheckPropertiesInContext(IInvocationExpression element, IHighlightingConsumer consumer, IContextBoundSettingsStore settingsStore, Regex ignoredPropertiesRegex) in C:\projects\resharper-structured-logging\src\ReSharper.Structured.Logging\Analyzer\PropertiesNamingAnalyzer.cs:line 92 at JetBrains.ReSharper.Feature.Services.Daemon.ElementProblemAnalyzerRegistrar.ElementAnalyzerDispatcher.Run(ITreeNode element, IHighlightingConsumer consumer) in Run.il:line IL_0063 mvid ABDB
I think this query on youtrack would show you all the related reports https://youtrack.jetbrains.com/issues?q=%22resharper-structured-logging%22%20JetBrains.ReSharper.Psi.ConstantValue.get_StringValue
Huh, this is a pretty old bug. I'll take a look. Thanks.
Previously this was never a problem, because only string was allowed for the attribute parameter value.
New dotnet/langversion allows setting const or string interpolation there. Like in my case:
corresponding automatic exception report https://youtrack.jetbrains.com/issue/DEXP-708411/Analyzer-ReSharper.Structured.Logging.Analyzer.PropertiesNamingAnalyzer-threw-the-following-exception-Specified-cast-is-not
Similar fix in the Unity support plugin: https://github.com/JetBrains/resharper-unity/commit/e9df0000ed708d8250f5ede98f6685c4c4e9ac23