1

Closed

Core.Parser Exception when C# Source has destructor

description

This looks like it is happening in every C# file that has a destructor.

I conditionally compiled out the destructor in one of the files having the issue, and it was able to successfully handle the file.

-=-

After upgrading to the latest, I receive this on several files.

Error 58 SA0001 : CoreParser : An exception occurred while parsing the file: System.MissingMethodException, Method 'StyleCop.CSharp.DocumentationRules.GetExampleSummaryTextForDestructor' not found.
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at StyleCopPlus.Plugin.ExtendedOriginal.ExtendedOriginalRules.GetExampleSummaryTextForDestructor(SourceAnalyzer customDocumentationAnalyzer)
at StyleCopPlus.Plugin.ExtendedOriginal.ExtendedOriginalRules.Handle1643(ViolationEventArgs e)
at StyleCopPlus.Plugin.ExtendedOriginal.ExtendedOriginalRules.OnCustomViolationEncountered(Object sender, ViolationEventArgs e)
at StyleCop.StyleCopCore.OnViolationEncountered(ViolationEventArgs e)
at StyleCop.StyleCopCore.AddViolation(ICodeElement element, Violation violation)
at StyleCop.StyleCopCore.AddViolation(ICodeElement element, Rule type, Int32 line, Object[] values)
at StyleCop.StyleCopAddIn.AddViolation(ICodeElement element, Int32 line, String ruleName, Object[] values)
at StyleCop.StyleCopAddIn.AddViolation(ICodeElement element, Enum ruleName, Object[] values)
at StyleCop.CSharp.DocumentationRules.CheckDestructorSummaryText(Destructor destructor, XmlDocument formattedDocs)
at StyleCop.CSharp.DocumentationRules.ParseHeader(CsElement element, XmlHeader header, Int32 lineNumber, Boolean partialElement)
at StyleCop.CSharp.DocumentationRules.CheckHeader(CsElement element, AnalyzerSettings settings, Boolean partialElement)
at StyleCop.CSharp.DocumentationRules.CheckDocumentationForElement(CsElement element, CsElement parentElement, AnalyzerSettings settings)
at StyleCop.CSharp.CodeWalker1.VisitElement(CsElement element, CsElement parentElement, T& context)
at StyleCop.CSharp.CodeWalker
1.WalkElement(CsElement element, CsElement parentElement, T context)
at StyleCop.CSharp.CodeWalker1.WalkElement(CsElement element, CsElement parentElement, T context)
at StyleCop.CSharp.CodeWalker
1.WalkElement(CsElement element, CsElement parentElement, T context)
at StyleCop.CSharp.CodeWalker1.WalkElement(CsElement element, CsElement parentElement, T context)
at StyleCop.CSharp.DocumentationRules.CheckElementDocumentation(CsDocument document)
at StyleCop.CSharp.DocumentationRules.AnalyzeDocument(CodeDocument document)
at StyleCopPlus.Plugin.ExtendedOriginal.ExtendedOriginalRules.AnalyzeDocument(CodeDocument document)
at StyleCopPlus.StyleCopPlusRules.AnalyzeDocument(CodeDocument document)
at StyleCop.StyleCopThread.RunAnalyzers(CodeDocument document, SourceParser parser, IEnumerable
1 analyzers)
at StyleCop.StyleCopThread.TestAndRunAnalyzers(CodeDocument document, SourceParser parser, IEnumerable`1 analyzers, Int32 passNumber)
at StyleCop.StyleCopThread.ParseAndAnalyzeDocument(SourceCode sourceCode, DocumentAnalysisStatus documentStatus)
at StyleCop.StyleCopThread.DoWork(Object sender). C:\XPJustice\Source\Dev\V1.92\Dev\Platform\Diagnostics\Diagnostics\PerformanceCounters.cs 1 1 Diagnostics
Closed Dec 15, 2012 at 12:29 PM by andyr
Its a StyleCopPlus issue I think

comments

John_H_Bergman wrote Nov 29, 2012 at 6:05 PM

After digging around further, this appears to be an install related issue. I upgraded from a previous version (something like 4.7.12.0).

I uninstalled completely and reinstalled and it looks like that corrected the issue.

John_H_Bergman wrote Nov 29, 2012 at 7:46 PM

More information. This probably actually looks like it is related to the StyleCop+ Addin, After I copied that dll back to the stylecop directory, I started having issues again (I'll post a bug over there).