Ticket T565894
Visible to All Users

Idea how to start of analysis of unused members

created 7 years ago (modified 7 years ago)

Or another idea, don't do analysis such as unused member references until such time as the user has committed the changes to the document(s). This way it would reduce the impact it has on development whilst working on new classes and functions. This should probably go for any of the more intensive operations that CodeRush performs as part of it's functionality.

Show previous comments (38)

    Another stack trace for your review:
    System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: Missing or unknown name prefix. at Microsoft.CodeAnalysis.SymbolId.Parser.ParseNamedSymbol(List`1 results) at Microsoft.CodeAnalysis.SymbolId.Parser.ParseSymbolId(List`1 results) at Microsoft.CodeAnalysis.SymbolId.Parser.ParseTypeSymbol() at Microsoft.CodeAnalysis.SymbolId.Parser.ParseParameter() at Microsoft.CodeAnalysis.SymbolId.Parser.ParseParameterList(List`1 parameters) at Microsoft.CodeAnalysis.SymbolId.Parser.GetMatchingMethods(IReadOnlyList`1 containers, String name, List`1 results) at Microsoft.CodeAnalysis.SymbolId.Parser.ParseNamedSymbol(List`1 results) at Microsoft.CodeAnalysis.SymbolId.Parser.ParseSymbolId(List`1 results) at Microsoft.CodeAnalysis.SymbolId.Parser.Parse(String id, Compilation compilation, List`1 results) at Microsoft.CodeAnalysis.SymbolId.GetFirstSymbolForId(String id, Compilation compilation) at Microsoft.CodeAnalysis.Completion.Providers.SymbolCompletionItem.DecodeSymbols(List`1 ids, Compilation compilation, List`1 symbols) at Microsoft.CodeAnalysis.Completion.Providers.SymbolCompletionItem.<GetSymbolsAsync>d__6.MoveNext() --- 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 Microsoft.CodeAnalysis.Completion.Providers.AbstractSymbolCompletionProvider.<GetTextChangeAsync>d__26.MoveNext() --- 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 Microsoft.CodeAnalysis.Completion.CommonCompletionProvider.<GetChangeAsync>d__3.MoveNext() --- 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 Microsoft.CodeAnalysis.Completion.CompletionServiceWithProviders.<GetChangeAsync>d__31.MoveNext() --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at Roslyn.Utilities.TaskExtensions.WaitAndGetResult[T](Task`1 task, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.Editor.Implementation.IntelliSense.Completion.Controller.Commit(PresentationItem item, Model model, Nullable`1 commitChar, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.Editor.Implementation.IntelliSense.Completion.Controller.Commit(PresentationItem item, Model model, Nullable`1 commitChar) at Microsoft.CodeAnalysis.Editor.Implementation.IntelliSense.Completion.Controller.CommitOnTypeChar(Char ch) at Microsoft.CodeAnalysis.Editor.Implementation.IntelliSense.Completion.Controller.Microsoft.CodeAnalysis.Editor.ICommandHandler<Microsoft.CodeAnalysis.Editor.Commands.TypeCharCommandArgs>.ExecuteCommand(TypeCharCommandArgs args, Action nextHandler) at Microsoft.CodeAnalysis.Editor.CommandHandlers.AbstractCompletionCommandHandler.ExecuteCommandWorker[TCommandArgs](TCommandArgs args, Action nextHandler) at Microsoft.CodeAnalysis.Editor.CommandHandlers.AbstractCompletionCommandHandler.Microsoft.CodeAnalysis.Editor.ICommandHandler<Microsoft.CodeAnalysis.Editor.Commands.TypeCharCommandArgs>.ExecuteCommand(TypeCharCommandArgs args, Action nextHandler) at Microsoft.CodeAnalysis.Editor.Implementation.Commands.CommandHandlerService.<>c__DisplayClass6_1`1.<ExecuteHandlers>b__1() at Microsoft.CodeAnalysis.Editor.Implementation.DocumentationComments.AbstractDocumentationCommentCommandHandler`2.ExecuteCommand(TypeCharCommandArgs args, Action nextHandler) at Microsoft.CodeAnalysis.Editor.Implementation.Commands.CommandHandlerService.<>c__DisplayClass6_1`1.<ExecuteHandlers>b__1() at Microsoft.CodeAnalysis.Editor.Implementation.DocumentationComments.AbstractXmlTagCompletionCommandHandler.ExecuteCommand(TypeCharCommandArgs args, Action nextHandler) at Microsoft.CodeAnalysis.Editor.Implementation.Commands.CommandHandlerService.<>c__DisplayClass6_1`1.<ExecuteHandlers>b__1() at Microsoft.CodeAnalysis.Editor.Implementation.Formatting.FormatCommandHandler.ExecuteReturnOrTypeCommand(CommandArgs args, Action nextHandler, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.Editor.Implementation.Formatting.FormatCommandHandler.ExecuteCommand(TypeCharCommandArgs args, Action nextHandler) at Microsoft.CodeAnalysis.Editor.Implementation.Commands.CommandHandlerService.<>c__DisplayClass6_1`1.<ExecuteHandlers>b__1() at Microsoft.CodeAnalysis.Editor.Implementation.InlineRename.RenameCommandHandler.HandlePossibleTypingCommand(CommandArgs args, Action nextHandler, Action`1 actionIfInsideActiveSpan) at Microsoft.CodeAnalysis.Editor.Implementation.InlineRename.RenameCommandHandler.ExecuteCommand(TypeCharCommandArgs args, Action nextHandler) at Microsoft.CodeAnalysis.Editor.Implementation.Commands.CommandHandlerService.<>c__DisplayClass6_1`1.<ExecuteHandlers>b__1() at Microsoft.CodeAnalysis.Editor.Implementation.IntelliSense.SignatureHelp.Controller.Microsoft.CodeAnalysis.Editor.ICommandHandler<Microsoft.CodeAnalysis.Editor.Commands.TypeCharCommandArgs>.ExecuteCommand(TypeCharCommandArgs args, Action nextHandler) at Microsoft.CodeAnalysis.Editor.CommandHandlers.SignatureHelpCommandHandler.ExecuteCommandWorker[TCommandArgs](TCommandArgs args, Action nextHandler) at Microsoft.CodeAnalysis.Editor.CommandHandlers.SignatureHelpCommandHandler.Microsoft.CodeAnalysis.Editor.ICommandHandler<Microsoft.CodeAnalysis.Editor.Commands.TypeCharCommandArgs>.ExecuteCommand(TypeCharCommandArgs args, Action nextHandler) at Microsoft.CodeAnalysis.Editor.Implementation.Commands.CommandHandlerService.ExecuteHandlers[T](IList`1 commandHandlers, T args, Action lastHandler) at Microsoft.CodeAnalysis.Editor.Implementation.Commands.CommandHandlerService.Microsoft.CodeAnalysis.Editor.ICommandHandlerService.Execute[T](IContentType contentType, T args, Action lastHandler) at Microsoft.VisualStudio.LanguageServices.Implementation.AbstractOleCommandTarget.ExecuteTypeCharacter(IntPtr pvaIn, ITextBuffer subjectBuffer, IContentType contentType, Action executeNextCommandTarget) at Microsoft.VisualStudio.LanguageServices.Implementation.AbstractOleCommandTarget.ExecuteVisualStudio2000(Guid& pguidCmdGroup, UInt32 commandId, UInt32 executeInformation, IntPtr pvaIn, IntPtr pvaOut, ITextBuffer subjectBuffer, IContentType contentType) at Microsoft.VisualStudio.LanguageServices.Implementation.AbstractOleCommandTarget.Exec(Guid& pguidCmdGroup, UInt32 commandId, UInt32 executeInformation, IntPtr pvaIn, IntPtr pvaOut) at Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.InnerExec(Guid& pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut) at Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.Exec(Guid& pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut) at DevExpress.CodeRush.VSCodeCompletion.NamingSuggestions.NamingSuggestionsCommandHandler.Exec(Guid& pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut) at Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.InnerExec(Guid& pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut) at Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.Exec(Guid& pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut) at DevExpress.CodeRush.VSIntelliRush.IntelliRushCommandHandler.Exec(Guid& pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut) at Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.InnerExec(Guid& pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut) at Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.Exec(Guid& pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut) at DevExpress.CodeRush.VisualStudio.CommandTargets.CommandTargetChain.Exec(Guid& pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut) at Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.InnerExec(Guid& pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut) at Microsoft.VisualStudio.Editor.Implementation.SimpleTextViewWindow.Exec(Guid& pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut) at Microsoft.VisualStudio.Editor.Implementation.VsKeyboardFilter.SendCommand(Guid cmdGroup, UInt32 cmdID, Object inParam) at Microsoft.VisualStudio.Editor.Implementation.VsKeyboardFilter.TextInput(TextCompositionEventArgs args) at Microsoft.VisualStudio.Text.Editor.Implementation.KeyProcessorDispatcher.<>c.<DispatchTextInputEvents>b__6_0(KeyProcessor p, TextCompositionEventArgs args) at Microsoft.VisualStudio.Text.Editor.Implementation.KeyProcessorDispatcher.<>c__DisplayClass10_1`1.<Dispatch>b__0() at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.CallExtensionPoint(Object errorSource, Action call) ---> (Inner Exception #0) System.InvalidOperationException: Missing or unknown name prefix. at Microsoft.CodeAnalysis.SymbolId.Parser.ParseNamedSymbol(List`1 results) at Microsoft.CodeAnalysis.SymbolId.Parser.ParseSymbolId(List`1 results) at Microsoft.CodeAnalysis.SymbolId.Parser.ParseTypeSymbol() at Microsoft.CodeAnalysis.SymbolId.Parser.ParseParameter() at Microsoft.CodeAnalysis.SymbolId.Parser.ParseParameterList(List`1 parameters) at Microsoft.CodeAnalysis.SymbolId.Parser.GetMatchingMethods(IReadOnlyList`1 containers, String name, List`1 results) at Microsoft.CodeAnalysis.SymbolId.Parser.ParseNamedSymbol(List`1 results) at Microsoft.CodeAnalysis.SymbolId.Parser.ParseSymbolId(List`1 results) at Microsoft.CodeAnalysis.SymbolId.Parser.Parse(String id, Compilation compilation, List`1 results) at Microsoft.CodeAnalysis.SymbolId.GetFirstSymbolForId(String id, Compilation compilation) at Microsoft.CodeAnalysis.Completion.Providers.SymbolCompletionItem.DecodeSymbols(List`1 ids, Compilation compilation, List`1 symbols) at Microsoft.CodeAnalysis.Completion.Providers.SymbolCompletionItem.<GetSymbolsAsync>d__6.MoveNext() --- 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 Microsoft.CodeAnalysis.Completion.Providers.AbstractSymbolCompletionProvider.<GetTextChangeAsync>d__26.MoveNext() --- 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 Microsoft.CodeAnalysis.Completion.CommonCompletionProvider.<GetChangeAsync>d__3.MoveNext() --- 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 Microsoft.CodeAnalysis.Completion.CompletionServiceWithProviders.<GetChangeAsync>d__31.MoveNext()<---

    DevExpress Support Team 7 years ago

      Thank you for sharing this information with us. The cause of this exception is Microsoft.VisualStudio.LanguageServices.Implementation.AbstractOleCommandTarget.Exec. This is a loop event handler, and in this case, the event handler from CodeRush is already finished and the execution is already transfered to the next handler.

        Okay, I wasn't sure which process was at fault, all I saw was CodeRush being mentioned, so thought it best to bring it to your attention

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.