Windows11, vs2022, c#解决方案项目,调试进入,在断点添加代码,保存继续,然后VS就报错了,错误如下,提示新添加的代码无效,需要重新启动项目。同一个解决方案下的另外一个项目,调试时添加代码又没有问题,请问这个怎么解决?
错误 ENC0080 由于内部错误“System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'position')
at Microsoft.CodeAnalysis.SyntaxNode.FindTokenCore(Int32 position, Boolean findInsideTrivia)
at Microsoft.CodeAnalysis.EditAndContinue.AbstractEditAndContinueAnalyzer.AnalyzeUnchangedActiveMemberBodies(ArrayBuilder1 diagnostics, Match
1 topMatch, SourceText newText, ImmutableArray1 oldActiveStatements, ImmutableArray
1 newActiveStatementSpans, Builder newActiveStatements, Builder newExceptionRegions, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.EditAndContinue.AbstractEditAndContinueAnalyzer.AnalyzeDocumentAsync(Project oldProject, AsyncLazy1 lazyOldActiveStatementMap, Document newDocument, ImmutableArray
1 newActiveStatementSpans, AsyncLazy`1 lazyCapabilities, CancellationToken cancellationToken)”,