Quantcast
Channel: SharpDevelop Community
Viewing all articles
Browse latest Browse all 1764

Exception while typing in, or reopening, a newbie Linq experiment

$
0
0

I had the same exception first when I typed the last "select" in source code; but I lost that post body when I clicked forum Options tab.

Re-opening the project immediately threw the same exception, as follows, source code following:

SharpDevelop Version : 5.1.0.5134-RC-d5052dc5
.NET Version         : 4.6.00081
OS Version           : Microsoft Windows NT 6.1.7601 Service Pack 1
Current culture      : English (United States) (en-US)
Running under WOW6432, processor architecture: x86-64
Working Set Memory   : 130196kb
GC Heap Memory       : 21712kb

Unhandled WPF exception
Exception thrown:
System.ApplicationException: Error highlighting line 61 ---> System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at ICSharpCode.NRefactory.CSharp.Resolver.ResolveVisitor.GetResolveResult(AstNode node)
   at ICSharpCode.NRefactory.CSharp.Resolver.CSharpAstResolver.Resolve(AstNode node, CancellationToken cancellationToken)
   at ICSharpCode.NRefactory.CSharp.Analysis.SemanticHighlightingVisitor`1.VisitSimpleType(SimpleType simpleType)
   at ICSharpCode.NRefactory.CSharp.SimpleType.AcceptVisitor(IAstVisitor visitor)
   at ICSharpCode.NRefactory.CSharp.Analysis.SemanticHighlightingVisitor`1.VisitChildren(AstNode node)
   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitQueryJoinClause(QueryJoinClause queryJoinClause)
   at ICSharpCode.NRefactory.CSharp.QueryJoinClause.AcceptVisitor(IAstVisitor visitor)
   at ICSharpCode.NRefactory.CSharp.Analysis.SemanticHighlightingVisitor`1.VisitChildren(AstNode node)
   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitQueryExpression(QueryExpression queryExpression)
   at ICSharpCode.NRefactory.CSharp.QueryExpression.AcceptVisitor(IAstVisitor visitor)
   at ICSharpCode.NRefactory.CSharp.Analysis.SemanticHighlightingVisitor`1.VisitChildren(AstNode node)
   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitExpressionStatement(ExpressionStatement expressionStatement)
   at ICSharpCode.NRefactory.CSharp.ExpressionStatement.AcceptVisitor(IAstVisitor visitor)
   at ICSharpCode.NRefactory.CSharp.Analysis.SemanticHighlightingVisitor`1.VisitChildren(AstNode node)
   at ICSharpCode.NRefactory.CSharp.Analysis.SemanticHighlightingVisitor`1.VisitBlockStatement(BlockStatement blockStatement)
   at ICSharpCode.NRefactory.CSharp.BlockStatement.AcceptVisitor(IAstVisitor visitor)
   at ICSharpCode.NRefactory.CSharp.Analysis.SemanticHighlightingVisitor`1.VisitChildrenAfter(AstNode node, AstNode start)
   at ICSharpCode.NRefactory.CSharp.Analysis.SemanticHighlightingVisitor`1.VisitMethodDeclaration(MethodDeclaration methodDeclaration)
   at ICSharpCode.NRefactory.CSharp.MethodDeclaration.AcceptVisitor(IAstVisitor visitor)
   at ICSharpCode.NRefactory.CSharp.Analysis.SemanticHighlightingVisitor`1.VisitChildrenAfter(AstNode node, AstNode start)
   at ICSharpCode.NRefactory.CSharp.Analysis.SemanticHighlightingVisitor`1.VisitTypeDeclaration(TypeDeclaration typeDeclaration)
   at ICSharpCode.NRefactory.CSharp.TypeDeclaration.AcceptVisitor(IAstVisitor visitor)
   at ICSharpCode.NRefactory.CSharp.Analysis.SemanticHighlightingVisitor`1.VisitChildren(AstNode node)
   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitNamespaceDeclaration(NamespaceDeclaration namespaceDeclaration)
   at ICSharpCode.NRefactory.CSharp.NamespaceDeclaration.AcceptVisitor(IAstVisitor visitor)
   at ICSharpCode.NRefactory.CSharp.Analysis.SemanticHighlightingVisitor`1.VisitChildren(AstNode node)
   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitSyntaxTree(SyntaxTree syntaxTree)
   at ICSharpCode.NRefactory.CSharp.SyntaxTree.AcceptVisitor(IAstVisitor visitor)
   at CSharpBinding.CSharpSemanticHighlighter.DoHighlightLine(Int32 lineNumber, IDocumentLine documentLine, CachedLine cachedLine, ITextSourceVersion newVersion)
   --- End of inner exception stack trace ---
   at CSharpBinding.CSharpSemanticHighlighter.DoHighlightLine(Int32 lineNumber, IDocumentLine documentLine, CachedLine cachedLine, ITextSourceVersion newVersion)
   at CSharpBinding.CSharpSemanticHighlighter.HighlightLine(Int32 lineNumber)
   at ICSharpCode.AvalonEdit.AddIn.MultiHighlighter.HighlightLine(Int32 lineNumber)
   at ICSharpCode.AvalonEdit.AddIn.CustomizingHighlighter.HighlightLine(Int32 lineNumber)
   at ICSharpCode.AvalonEdit.Highlighting.HighlightingColorizer.ColorizeLine(DocumentLine line)
   at ICSharpCode.AvalonEdit.Rendering.DocumentColorizingTransformer.Colorize(ITextRunConstructionContext context)
   at ICSharpCode.AvalonEdit.Highlighting.HighlightingColorizer.Colorize(ITextRunConstructionContext context)
   at ICSharpCode.AvalonEdit.Rendering.ColorizingTransformer.Transform(ITextRunConstructionContext context, IList`1 elements)
   at ICSharpCode.AvalonEdit.Rendering.VisualLine.RunTransformers(ITextRunConstructionContext context, IVisualLineTransformer[ transformers)
   at ICSharpCode.AvalonEdit.Rendering.TextView.BuildVisualLine(DocumentLine documentLine, TextRunProperties globalTextRunProperties, VisualLineTextParagraphProperties paragraphProperties, VisualLineElementGenerator[ elementGeneratorsArray, IVisualLineTransformer[ lineTransformersArray, Size availableSize)
   at ICSharpCode.AvalonEdit.Rendering.TextView.CreateAndMeasureVisualLines(Size availableSize)
   at ICSharpCode.AvalonEdit.Rendering.TextView.MeasureOverride(Size availableSize)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.DockPanel.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ScrollContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.ScrollViewer.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at AvalonDock.ResizingPanel.MeasureOverride(Size availableSize)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at AvalonDock.ResizingPanel.MeasureOverride(Size availableSize)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.ContextLayoutManager.UpdateLayout()
   at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
   at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

---- Recent log messages:
13:09:23.031 [1] DEBUG - Update Foldings
13:09:23.031 [1] DEBUG - Service startup: ICSharpCode.SharpDevelop.Editor.Bookmarks.IBookmarkManager
13:09:23.071 [1] DEBUG - Trying to restore memento of '[AvalonEditViewContent C:\Users\gscheper\Documents\SharpDevelop Projects\JustToEditCppFile\JustToEditCppFile\CppFileToEdit.cs]' from key '1e13ec5:C:\USERS\GSCHEPER\DOCUMENTS\SHARPDEVELOP PROJECTS\JUSTTOEDITCPPFILE\JUSTTOEDITCPPFILE\CPPFILETOEDIT.CS'
13:09:23.101 [1] INFO - Open file C:\Users\gscheper\Documents\SharpDevelop Projects\JustToEditCppFile\JustToEditCppFile\Program.cs
13:09:23.121 [1] DEBUG - Update Foldings
13:09:23.131 [1] DEBUG - Trying to restore memento of '[AvalonEditViewContent C:\Users\gscheper\Documents\SharpDevelop Projects\JustToEditCppFile\JustToEditCppFile\Program.cs]' from key '1e13ec5:C:\USERS\GSCHEPER\DOCUMENTS\SHARPDEVELOP PROJECTS\JUSTTOEDITCPPFILE\JUSTTOEDITCPPFILE\PROGRAM.CS'
13:09:23.131 [1] DEBUG - NavigationService -- resume logging
13:09:23.131 [1] DEBUG - ActiveContentChanged to [AvalonEditViewContent C:\Users\gscheper\Documents\SharpDevelop Projects\JustToEditCppFile\JustToEditCppFile\Program.cs]
13:09:23.141 [1] DEBUG - ActiveWorkbenchWindowChanged to [AvalonWorkbenchWindow: Program.cs]
13:09:23.141 [1] INFO - CurrentProject changed to JustToEditCppFile
13:09:23.141 [1] DEBUG - NavigationService
    ActiveViewContent: Program.cs
              Subview: ${res:FormsDesigner.DesignTabPages.SourceTabPage}
13:09:23.141 [1] DEBUG - ActiveViewContentChanged to [AvalonEditViewContent C:\Users\gscheper\Documents\SharpDevelop Projects\JustToEditCppFile\JustToEditCppFile\Program.cs]
13:09:23.161 [1] WARN - IssueManager crashed: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at ICSharpCode.NRefactory.CSharp.Resolver.ResolveVisitor.GetResolveResult(AstNode node)
   at ICSharpCode.NRefactory.CSharp.Resolver.CSharpAstResolver.Resolve(AstNode node, CancellationToken cancellationToken)
   at ICSharpCode.NRefactory.CSharp.Refactoring.RedundantUsingDirectiveIssue.GatherVisitor.VisitSimpleType(SimpleType simpleType)
   at ICSharpCode.NRefactory.CSharp.SimpleType.AcceptVisitor(IAstVisitor visitor)
   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren(AstNode node)
   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitQueryJoinClause(QueryJoinClause queryJoinClause)
   at ICSharpCode.NRefactory.CSharp.QueryJoinClause.AcceptVisitor(IAstVisitor visitor)
   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren(AstNode node)
   at ICSharpCode.NRefactory.CSharp.Refactoring.RedundantUsingDirectiveIssue.GatherVisitor.VisitQueryExpression(QueryExpression queryExpression)
   at ICSharpCode.NRefactory.CSharp.QueryExpression.AcceptVisitor(IAstVisitor visitor)
   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren(AstNode node)
   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitExpressionStatement(ExpressionStatement expressionStatement)
   at ICSharpCode.NRefactory.CSharp.ExpressionStatement.AcceptVisitor(IAstVisitor visitor)
   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren(AstNode node)
   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitBlockStatement(BlockStatement blockStatement)
   at ICSharpCode.NRefactory.CSharp.BlockStatement.AcceptVisitor(IAstVisitor visitor)
   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren(AstNode node)
   at ICSharpCode.NRefactory.CSharp.GatherVisitorBase`1.VisitMethodDeclaration(MethodDeclaration methodDeclaration)
   at ICSharpCode.NRefactory.CSharp.MethodDeclaration.AcceptVisitor(IAstVisitor visitor)
   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren(AstNode node)
   at ICSharpCode.NRefactory.CSharp.GatherVisitorBase`1.VisitTypeDeclaration(TypeDeclaration typeDeclaration)
   at ICSharpCode.NRefactory.CSharp.TypeDeclaration.AcceptVisitor(IAstVisitor visitor)
   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren(AstNode node)
   at ICSharpCode.NRefactory.CSharp.Refactoring.RedundantUsingDirectiveIssue.GatherVisitor.VisitNamespaceDeclaration(NamespaceDeclaration namespaceDeclaration)
   at ICSharpCode.NRefactory.CSharp.NamespaceDeclaration.AcceptVisitor(IAstVisitor visitor)
   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren(AstNode node)
   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitSyntaxTree(SyntaxTree syntaxTree)
   at ICSharpCode.NRefactory.CSharp.SyntaxTree.AcceptVisitor(IAstVisitor visitor)
   at ICSharpCode.NRefactory.CSharp.Refactoring.RedundantUsingDirectiveIssue.GetIssues(BaseRefactoringContext context, String subIssue)
   at CSharpBinding.Refactoring.IssueManager.IssueProvider.GetIssues(BaseRefactoringContext context)
   at CSharpBinding.Refactoring.IssueManager.<>c__DisplayClass19_0.<RunAnalysis>b__0()
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at CSharpBinding.Refactoring.IssueManager.<RunAnalysis>d__19.MoveNext()
13:09:23.411 [LoadSolutionProjects] DEBUG - JustToEditCppFile: ParseFiles() finished. 0 files were re-used from CC cache; 3 files were parsed (3 of those are serializable)
13:09:23.421 [1] INFO - Loading addin ASP.NET MVC Binding
13:09:23.421 [1] DEBUG - Service startup: ICSharpCode.UnitTesting.ITestService
13:09:23.524 [1] DEBUG - Update Foldings
13:09:23.537 [1] DEBUG - Update Foldings
13:09:23.599 [8] DEBUG - Resolved (Line 6, Col 1) to
13:09:23.783 [9] DEBUG - Git: OverlayIconManager Thread finished
13:09:23.800 [LoadSolutionProjects] DEBUG - LoadSolutionProjectsThread finished after 00:00:01.1421611
13:09:23.811 [1] WARN - IssueManager crashed: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at ICSharpCode.NRefactory.CSharp.Resolver.ResolveVisitor.GetResolveResult(AstNode node)
   at ICSharpCode.NRefactory.CSharp.Resolver.CSharpAstResolver.Resolve(AstNode node, CancellationToken cancellationToken)
   at ICSharpCode.NRefactory.CSharp.Refactoring.RedundantUsingDirectiveIssue.GatherVisitor.VisitSimpleType(SimpleType simpleType)
   at ICSharpCode.NRefactory.CSharp.SimpleType.AcceptVisitor(IAstVisitor visitor)
   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren(AstNode node)
   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitQueryJoinClause(QueryJoinClause queryJoinClause)
   at ICSharpCode.NRefactory.CSharp.QueryJoinClause.AcceptVisitor(IAstVisitor visitor)
   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren(AstNode node)
   at ICSharpCode.NRefactory.CSharp.Refactoring.RedundantUsingDirectiveIssue.GatherVisitor.VisitQueryExpression(QueryExpression queryExpression)
   at ICSharpCode.NRefactory.CSharp.QueryExpression.AcceptVisitor(IAstVisitor visitor)
   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren(AstNode node)
   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitExpressionStatement(ExpressionStatement expressionStatement)
   at ICSharpCode.NRefactory.CSharp.ExpressionStatement.AcceptVisitor(IAstVisitor visitor)
   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren(AstNode node)
   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitBlockStatement(BlockStatement blockStatement)
   at ICSharpCode.NRefactory.CSharp.BlockStatement.AcceptVisitor(IAstVisitor visitor)
   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren(AstNode node)
   at ICSharpCode.NRefactory.CSharp.GatherVisitorBase`1.VisitMethodDeclaration(MethodDeclaration methodDeclaration)
   at ICSharpCode.NRefactory.CSharp.MethodDeclaration.AcceptVisitor(IAstVisitor visitor)
   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren(AstNode node)
   at ICSharpCode.NRefactory.CSharp.GatherVisitorBase`1.VisitTypeDeclaration(TypeDeclaration typeDeclaration)
   at ICSharpCode.NRefactory.CSharp.TypeDeclaration.AcceptVisitor(IAstVisitor visitor)
   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren(AstNode node)
   at ICSharpCode.NRefactory.CSharp.Refactoring.RedundantUsingDirectiveIssue.GatherVisitor.VisitNamespaceDeclaration(NamespaceDeclaration namespaceDeclaration)
   at ICSharpCode.NRefactory.CSharp.NamespaceDeclaration.AcceptVisitor(IAstVisitor visitor)
   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren(AstNode node)
   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitSyntaxTree(SyntaxTree syntaxTree)
   at ICSharpCode.NRefactory.CSharp.SyntaxTree.AcceptVisitor(IAstVisitor visitor)
   at ICSharpCode.NRefactory.CSharp.Refactoring.RedundantUsingDirectiveIssue.GetIssues(BaseRefactoringContext context, String subIssue)
   at CSharpBinding.Refactoring.IssueManager.IssueProvider.GetIssues(BaseRefactoringContext context)
   at CSharpBinding.Refactoring.IssueManager.<>c__DisplayClass19_0.<RunAnalysis>b__0()
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at CSharpBinding.Refactoring.IssueManager.<RunAnalysis>d__19.MoveNext()
13:09:24.357 [12] DEBUG - Resolved (Line 6, Col 1) to
13:09:24.360 [18] DEBUG - Resolved (Line 55, Col 1) to [InvocationResolveResult [SpecializedMethod Anonymous Type..ctor():System.Void]]
13:09:26.782 [1] ERROR - Unhandled WPF exception
--> Exception:
System.ApplicationException: Error highlighting line 61 ---> System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at ICSharpCode.NRefactory.CSharp.Resolver.ResolveVisitor.GetResolveResult(AstNode node)
   at ICSharpCode.NRefactory.CSharp.Resolver.CSharpAstResolver.Resolve(AstNode node, CancellationToken cancellationToken)
   at ICSharpCode.NRefactory.CSharp.Analysis.SemanticHighlightingVisitor`1.VisitSimpleType(SimpleType simpleType)
   at ICSharpCode.NRefactory.CSharp.SimpleType.AcceptVisitor(IAstVisitor visitor)
   at ICSharpCode.NRefactory.CSharp.Analysis.SemanticHighlightingVisitor`1.VisitChildren(AstNode node)
   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitQueryJoinClause(QueryJoinClause queryJoinClause)
   at ICSharpCode.NRefactory.CSharp.QueryJoinClause.AcceptVisitor(IAstVisitor visitor)
   at ICSharpCode.NRefactory.CSharp.Analysis.SemanticHighlightingVisitor`1.VisitChildren(AstNode node)
   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitQueryExpression(QueryExpression queryExpression)
   at ICSharpCode.NRefactory.CSharp.QueryExpression.AcceptVisitor(IAstVisitor visitor)
   at ICSharpCode.NRefactory.CSharp.Analysis.SemanticHighlightingVisitor`1.VisitChildren(AstNode node)
   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitExpressionStatement(ExpressionStatement expressionStatement)
   at ICSharpCode.NRefactory.CSharp.ExpressionStatement.AcceptVisitor(IAstVisitor visitor)
   at ICSharpCode.NRefactory.CSharp.Analysis.SemanticHighlightingVisitor`1.VisitChildren(AstNode node)
   at ICSharpCode.NRefactory.CSharp.Analysis.SemanticHighlightingVisitor`1.VisitBlockStatement(BlockStatement blockStatement)
   at ICSharpCode.NRefactory.CSharp.BlockStatement.AcceptVisitor(IAstVisitor visitor)
   at ICSharpCode.NRefactory.CSharp.Analysis.SemanticHighlightingVisitor`1.VisitChildrenAfter(AstNode node, AstNode start)
   at ICSharpCode.NRefactory.CSharp.Analysis.SemanticHighlightingVisitor`1.VisitMethodDeclaration(MethodDeclaration methodDeclaration)
   at ICSharpCode.NRefactory.CSharp.MethodDeclaration.AcceptVisitor(IAstVisitor visitor)
   at ICSharpCode.NRefactory.CSharp.Analysis.SemanticHighlightingVisitor`1.VisitChildrenAfter(AstNode node, AstNode start)
   at ICSharpCode.NRefactory.CSharp.Analysis.SemanticHighlightingVisitor`1.VisitTypeDeclaration(TypeDeclaration typeDeclaration)
   at ICSharpCode.NRefactory.CSharp.TypeDeclaration.AcceptVisitor(IAstVisitor visitor)
   at ICSharpCode.NRefactory.CSharp.Analysis.SemanticHighlightingVisitor`1.VisitChildren(AstNode node)
   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitNamespaceDeclaration(NamespaceDeclaration namespaceDeclaration)
   at ICSharpCode.NRefactory.CSharp.NamespaceDeclaration.AcceptVisitor(IAstVisitor visitor)
   at ICSharpCode.NRefactory.CSharp.Analysis.SemanticHighlightingVisitor`1.VisitChildren(AstNode node)
   at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitSyntaxTree(SyntaxTree syntaxTree)
   at ICSharpCode.NRefactory.CSharp.SyntaxTree.AcceptVisitor(IAstVisitor visitor)
   at CSharpBinding.CSharpSemanticHighlighter.DoHighlightLine(Int32 lineNumber, IDocumentLine documentLine, CachedLine cachedLine, ITextSourceVersion newVersion)
   --- End of inner exception stack trace ---
   at CSharpBinding.CSharpSemanticHighlighter.DoHighlightLine(Int32 lineNumber, IDocumentLine documentLine, CachedLine cachedLine, ITextSourceVersion newVersion)
   at CSharpBinding.CSharpSemanticHighlighter.HighlightLine(Int32 lineNumber)
   at ICSharpCode.AvalonEdit.AddIn.MultiHighlighter.HighlightLine(Int32 lineNumber)
   at ICSharpCode.AvalonEdit.AddIn.CustomizingHighlighter.HighlightLine(Int32 lineNumber)
   at ICSharpCode.AvalonEdit.Highlighting.HighlightingColorizer.ColorizeLine(DocumentLine line)
   at ICSharpCode.AvalonEdit.Rendering.DocumentColorizingTransformer.Colorize(ITextRunConstructionContext context)
   at ICSharpCode.AvalonEdit.Highlighting.HighlightingColorizer.Colorize(ITextRunConstructionContext context)
   at ICSharpCode.AvalonEdit.Rendering.ColorizingTransformer.Transform(ITextRunConstructionContext context, IList`1 elements)
   at ICSharpCode.AvalonEdit.Rendering.VisualLine.RunTransformers(ITextRunConstructionContext context, IVisualLineTransformer[ transformers)
   at ICSharpCode.AvalonEdit.Rendering.TextView.BuildVisualLine(DocumentLine documentLine, TextRunProperties globalTextRunProperties, VisualLineTextParagraphProperties paragraphProperties, VisualLineElementGenerator[ elementGeneratorsArray, IVisualLineTransformer[ lineTransformersArray, Size availableSize)
   at ICSharpCode.AvalonEdit.Rendering.TextView.CreateAndMeasureVisualLines(Size availableSize)
   at ICSharpCode.AvalonEdit.Rendering.TextView.MeasureOverride(Size availableSize)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.DockPanel.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ScrollContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.ScrollViewer.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at AvalonDock.ResizingPanel.MeasureOverride(Size availableSize)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at AvalonDock.ResizingPanel.MeasureOverride(Size availableSize)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.ContextLayoutManager.UpdateLayout()
   at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
   at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

---- Post-error application state information:
Installed 3rd party AddIns:
ProjectService.CurrentSolution: [Solution C:\Users\gscheper\Documents\SharpDevelop Projects\JustToEditCppFile\JustToEditCppFile.sln with 1 projects]
ProjectService.CurrentProject: [CSharpProject: JustToEditCppFile]
Workbench.ActiveContent: [AvalonEditViewContent C:\Users\gscheper\Documents\SharpDevelop Projects\JustToEditCppFile\JustToEditCppFile\Program.cs]

==================

/*
 * Created by SharpDevelop.
 * User: gscheper
 * Date: 10/28/2015
 * Time: 9:23 AM
 *
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;

namespace JustToEditCppFile
{
    class Program
    {
        public static void Main(string[ args)
        {
            Console.WriteLine("Hello World!");
           
            // TODO: Implement Functionality Here
            // ==================================

           
            // ============= FROM...IN, (WHERE, SELECT)|Where(=>) ===============
           
            int [ nums = {1, 20, 4, 16};

            IEnumerable<int> query =
                from int n in nums // type is optional before iteration variable 'n'
                where n > 10
                select n;

            foreach(int n in query)
                Console.WriteLine("{0}", n); // curiously, this OTHER 'n' makes no complaint
           
            var method = nums.Where( x => x < 10);
            foreach(int i in method)
                Console.WriteLine("{0}", i);
           
            Console.WriteLine("{0}", method.Count());

            // ============= JOIN...IN...ON ===============
           
            var anonArray1 = new {
                new {F1=1, F2=2},
                new {F1=2, F2=20},
                new {F1=3, F2=2},
                new {F1=4, F2=25},
            };
           
            var anonArray2 = new {
                new {F1=1, F2=2},
                new {F1=2, F2=20},
                new {F1=3, F2=2},
                new {F1=4, F2=25},
            };
           
            from var a in anonArray1
                join var b in anonArray2
                on a.F2 equals b.F2
                select
           
            // ==================================
            Console.WriteLine("Press any key to continue . . . ");
            Console.ReadKey(true);
        }
    }
}

 

 

 


Viewing all articles
Browse latest Browse all 1764

Trending Articles