Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception occurs when starting up Visual Studio 2017 #6

Open
ghost opened this issue Sep 7, 2018 · 2 comments
Open

Exception occurs when starting up Visual Studio 2017 #6

ghost opened this issue Sep 7, 2018 · 2 comments

Comments

@ghost
Copy link

ghost commented Sep 7, 2018

I've been getting the following exception whenever I start up VS (15.8.3). It has only started occurring since I installed your extension. It doesn't keep me from doing work. It's just very annoying.

System.InvalidCastException: Unable to cast object of type 'ICSharpCode.NRefactory.CSharp.ReturnStatement' to type 'ICSharpCode.NRefactory.CSharp.BlockStatement'.at ICSharpCode.NRefactory.CSharp.CSharpParser.ConversionVisitor.Visit(Method m)at Mono.CSharp.Method.Accept(StructuralVisitor visitor)at Mono.CSharp.StructuralVisitor.VisitTypeDefinition(TypeDefinition tc)at ICSharpCode.NRefactory.CSharp.CSharpParser.ConversionVisitor.Visit(Class c)at Mono.CSharp.Class.Accept(StructuralVisitor visitor)at ICSharpCode.NRefactory.CSharp.CSharpParser.ConversionVisitor.Visit(NamespaceContainer ns)at Mono.CSharp.NamespaceContainer.Accept(StructuralVisitor visitor)at ICSharpCode.NRefactory.CSharp.CSharpParser.ConversionVisitor.Visit(ModuleContainer mc)at Mono.CSharp.ModuleContainer.Accept(StructuralVisitor visitor)at ICSharpCode.NRefactory.CSharp.CSharpParser.Parse(CompilerCompilationUnit top, String fileName)at ICSharpCode.NRefactory.CSharp.CSharpParser.Parse(ITextSource program, String fileName, Int32 initialLine, Int32 initialColumn)at ICSharpCode.NRefactory.CSharp.CSharpParser.Parse(ITextSource program, String fileName)at ICSharpCode.NRefactory.CSharp.CSharpParser.Parse(TextReader reader, String fileName)at CodeMetrics.Parsing.MethodsExtractor.Extract(String fileCode)at CodeMetrics.Adornments.MetricsAdornment.Init(ITextSnapshot textSnapshot)at CodeMetrics.Adornments.MetricsAdornment..ctor(IWpfTextView view, IMethodsExtractor methodsExtractor, IComplexityCalculator complexityCalculator)at CodeMetrics.Adornments.MeticsAdornmentFactory.TextViewCreated(IWpfTextView textView)at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.<>c__DisplayClass251_0.b__1()at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.CallExtensionPoint(Object errorSource, Action call) --- End of stack trace from previous location where exception was thrown ---at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)

@elishalom
Copy link
Owner

Thanks for the report. Until I'll get to fix it, you may try a fork of the project which may have fixed it:
https://marketplace.visualstudio.com/items?itemName=vkacmar.RoslynCodeMetrices

@elishalom
Copy link
Owner

@slavdude
In a "reasonable" delay :) If you're still using the extension, is there a chance you have a code that reproduces the exception?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant