看上去是热重载的内部错误,这种只能报告给微软让他们解决了。
当然,这种问题可能是临时性错误,或许重启一下就好了。
Windows 2011 23H2系统,VS2022 17.8.5版本,C#解决方案项目,debug x86 调试进入,在断点添加代码,保存继续,然后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)”,