
System.IndexOutOfRangeException : Index was outside the bounds of the array.
at System.Collections.Generic.Dictionary`2.Insert(TKey key,TValue value,Boolean add)
at Microsoft.CodeAnalysis.CSharp.Symbols.Retargeting.RetargetingModuleSymbol.SetReferences(ModuleReferences`1 moduleReferences,SourceAssemblySymbol originatingSourceAssemblyDebugOnly)
at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.ReferenceManager.SetupReferencesForRetargetingAssembly(BoundInputAssembly[] bindingResult,BoundInputAssembly& currentBindingResult,Dictionary`2& missingAssemblies,SourceAssemblySymbol sourceAssemblyDebugOnly)
at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.ReferenceManager.InitializeNewSymbols(List`1 newSymbols,SourceAssemblySymbol sourceAssembly,ImmutableArray`1 assemblies,BoundInputAssembly[] bindingResult,Dictionary`2 missingAssemblies)
at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.ReferenceManager.CreateAndSetSourceAssemblyFullBind(CSharpCompilation compilation)
at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.ReferenceManager.CreateSourceAssemblyForCompilation(CSharpCompilation compilation)
at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.get_CommonAssembly()
at Microsoft.CodeAnalysis.SolutionState.UnrootedSymbolSet.Create(Compilation compilation)
at Microsoft.CodeAnalysis.SolutionState.CompilationTracker.FinalState.Create(ValueSource`1 finalCompilationSource,ValueSource`1 compilationWithoutGeneratedFilesSource,Compilation compilationWithoutGeneratedFiles,Boolean hasSuccessfullyLoaded,TextDocumentStates`1 generatedDocuments,Compilation finalCompilation,ProjectId projectId,Dictionary`2 metadataReferenceToProjectId)
at async Microsoft.CodeAnalysis.SolutionState.CompilationTracker.FinalizeCompilationAsync(<Unknown Parameters>)
at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
at async Microsoft.CodeAnalysis.SolutionState.CompilationTracker.GetOrBuildCompilationInfoAsync(<Unknown Parameters>)
at async Microsoft.CodeAnalysis.SolutionState.CompilationTracker.GetCompilationSlowAsync(<Unknown Parameters>)
at async Microsoft.CodeAnalysis.Document.GetSemanticModelAsync(<Unknown Parameters>)
at async Microsoft.CodeAnalysis.Shared.Extensions.DocumentExtensions.GetRequiredSemanticModelAsync(<Unknown Parameters>)
at System.Threading.Tasks.ValueTask`1.get_Result()
at async Microsoft.CodeAnalysis.CSharp.ImplementInterface.AbstractChangeImplementionCodeRefactoringProvider.ComputeRefactoringsAsync(<Unknown Parameters>)
at async Microsoft.CodeAnalysis.CodeRefactorings.CodeRefactoringService.GetRefactoringFromProviderAsync(<Unknown Parameters>)
I want to know if there is any method to avoid this alert, when I open a file in the visual studio, there always popup some error message ,tell me that Index was outside the bounds of the array.What should I do to solve this problem. Is any good ideas?