Probably you can press the “Enable and ignore future errors” button.
You can also report this issue using HELP menu, Send Feedback, Report a Problem. This seems to be an issue of Visual Studio.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
System.IndexOutOfRangeException : Index was outside the bounds of the array.
at System.Collections.Generic.Dictionary2.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,Dictionary2& missingAssemblies,SourceAssemblySymbol sourceAssemblyDebugOnly) at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.ReferenceManager.InitializeNewSymbols(List
1 newSymbols,SourceAssemblySymbol sourceAssembly,ImmutableArray1 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(ValueSource1 finalCompilationSource,ValueSource
1 compilationWithoutGeneratedFilesSource,Compilation compilationWithoutGeneratedFiles,Boolean hasSuccessfullyLoaded,TextDocumentStates1 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?
Probably you can press the “Enable and ignore future errors” button.
You can also report this issue using HELP menu, Send Feedback, Report a Problem. This seems to be an issue of Visual Studio.
Hi, @anhua cai
Welcome to Microsoft Q&A!
I cannot reproduce your issue.
You can try to repair Visual Studio, use devenv.exe /safemode command to start Visual Studio.
If the problem persists, I suggest you directly suggest this feature to Visual Studio Product Team in our Developer Community, and if you do suggest this feature, please share the link here, other forum members, who are interested or needed this feature will go to vote for this thread.
Sincerely,
Peng
*
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread