System.ArgumentException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • VS crashes when getting completions
    via GitHub by vladima
    ,
  • GitHub comment 7396#170099486
    via GitHub by rvrn22
    ,
    • System.ArgumentException: An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at Microsoft.CodeAnalysis.SymbolKey.SymbolKeyWriter.WriteSymbolKey(ISymbol symbol, Boolean first) at Microsoft.CodeAnalysis.SymbolKey.SymbolKeyWriter.WriteSymbolKey(ISymbol symbol) at Microsoft.CodeAnalysis.SymbolKey.SymbolKeyWriter.WriteArray[T,U](ImmutableArray`1 array, Action`1 writeValue) at Microsoft.CodeAnalysis.SymbolKey.NamedTypeSymbolKey.Create(INamedTypeSymbol symbol, SymbolKeyWriter visitor) at Microsoft.CodeAnalysis.SymbolKey.SymbolKeyWriter.VisitNamedType(INamedTypeSymbol namedTypeSymbol) at Microsoft.CodeAnalysis.CSharp.Symbols.NamedTypeSymbol.Accept[TResult](SymbolVisitor`1 visitor) at Microsoft.CodeAnalysis.SymbolKey.SymbolKeyWriter.WriteSymbolKey(ISymbol symbol, Boolean first) at Microsoft.CodeAnalysis.SymbolKey.MethodSymbolKey.Create(IMethodSymbol symbol, SymbolKeyWriter visitor) at Microsoft.CodeAnalysis.SymbolKey.SymbolKeyWriter.VisitMethod(IMethodSymbol methodSymbol) at Microsoft.CodeAnalysis.CSharp.Symbols.MethodSymbol.Accept[TResult](SymbolVisitor`1 visitor) at Microsoft.CodeAnalysis.SymbolKey.SymbolKeyWriter.WriteSymbolKey(ISymbol symbol, Boolean first) at Microsoft.CodeAnalysis.SymbolKey.ToString(ISymbol symbol, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.Completion.Providers.SymbolCompletionItem.<>c.<EncodeSymbols>b__2_0(ISymbol s) at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext() at System.String.Join(String separator, IEnumerable`1 values) at Microsoft.CodeAnalysis.Completion.Providers.SymbolCompletionItem.EncodeSymbols(IReadOnlyList`1 symbols) at Microsoft.CodeAnalysis.Completion.Providers.SymbolCompletionItem.Create(String displayText, IReadOnlyList`1 symbols, Int32 contextPosition, String sortText, String insertionText, Nullable`1 glyph, String filterText, Nullable`1 matchPriority, SupportedPlatformData supportedPlatforms, ImmutableDictionary`2 properties, ImmutableArray`1 tags, CompletionItemRules rules) at Microsoft.CodeAnalysis.Completion.Providers.AbstractRecommendationServiceBasedCompletionProvider.CreateItem(String displayText, String insertionText, List`1 symbols, SyntaxContext context, Boolean preselect, SupportedPlatformData supportedPlatformData) at Microsoft.CodeAnalysis.Completion.Providers.AbstractSymbolCompletionProvider.CreateItem(String displayText, String insertionText, List`1 symbols, SyntaxContext context, Dictionary`2 invalidProjectMap, List`1 totalProjects, Boolean preselect) at Microsoft.CodeAnalysis.Completion.Providers.AbstractSymbolCompletionProvider.<>c__DisplayClass6_0.<CreateItems>b__3(IGrouping`2 g) at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext() at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) at Microsoft.CodeAnalysis.Completion.Providers.AbstractSymbolCompletionProvider.CreateItems(IEnumerable`1 symbols, SyntaxContext context, Dictionary`2 invalidProjectMap, List`1 totalProjects, Boolean preselect) at Microsoft.CodeAnalysis.Completion.Providers.AbstractSymbolCompletionProvider.<GetItemsWorkerAsync>d__16.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.<ProvideCompletionsAsync>d__15.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.<GetContextAsync>d__28.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 System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at Microsoft.CodeAnalysis.Completion.CompletionServiceWithProviders.<GetCompletionsAsync>d__21.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.Editor.Implementation.IntelliSense.Completion.Controller.Session.ModelComputer.<GetCompletionListAsync>d__14.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.Editor.Implementation.IntelliSense.Completion.Controller.Session.ModelComputer.<DoInBackgroundAsync>d__13.MoveNext()<--- Stack: at System.Environment.FailFast(System.String, System.Exception) at Microsoft.CodeAnalysis.FailFast.OnFatalException(System.Exception)
    No Bugmate found.