Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After vscode is started, click to go to the definition console and output the following error message: #4260

Closed
netzhouxinghong opened this issue Dec 4, 2020 · 1 comment · Fixed by OmniSharp/omnisharp-roslyn#2032

Comments

@netzhouxinghong
Copy link

After vscode is started, click to go to the definition console and output the following error message:
Note: This error will only appear when you click Go to Definition after vscode is started. It will not appear later. This error will only appear when you click Go to Definition after vscode is started and will only appear once. To reproduce this error, Please restart vscode and click to go to the definition to observe the output information. . .
In addition: you cannot jump to the parent interface after jumping to the subclass

vscode启动后点击转到定义控制台输出如下错误信息:
注意:是vscode启动后点击转到定义才会出现此错误,后面就不会出现了,此错误仅在vscode启动后点击转到定义才会出现并且只会出现一次,若要重现此错误,请将vscode重新启动再点击转到定义观察输出信息。。。
另外:跳转到实现子类后无法跳转到父接口

Successfully loaded project file 'c:\Users\ZHOUXINGHONG\source\repos\Essential-CSharp-7\HelloWorld\HelloWorld.csproj'.
info: OmniSharp.MSBuild.ProjectManager
Adding project 'c:\Users\ZHOUXINGHONG\source\repos\Essential-CSharp-7\HelloWorld\HelloWorld.csproj'
info: OmniSharp.MSBuild.ProjectManager
Update project: HelloWorld
[fail]: OmniSharp.Stdio.Host
************ Response ************
{
"Request_seq": 21,
"Command": "/gotoDefinition",
"Running": true,
"Success": false,
"Message": ""System.OperationCanceledException: 已取消该操作。\r\n 在 System.Threading.CancellationToken.ThrowOperationCanceledException()\r\n 在 Microsoft.CodeAnalysis.CSharp.Simplification.AbstractCSharpReducer.AbstractReductionRewriter.SimplifyNode[TNode](TNode node, SyntaxNode newNode, SyntaxNode parentNode, Func5 simplifier)\\r\\n 在 Microsoft.CodeAnalysis.CSharp.Simplification.AbstractCSharpReducer.AbstractReductionRewriter.SimplifyExpression[TExpression](TExpression expression, SyntaxNode newNode, Func5 simplifier)\r\n 在 Microsoft.CodeAnalysis.CSharp.Simplification.CSharpNameReducer.Rewriter.VisitPredefinedType(PredefinedTypeSyntax node)\r\n 在 Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.Visit(SyntaxNode node)\r\n 在 Microsoft.CodeAnalysis.CSharp.Simplification.AbstractCSharpReducer.AbstractReductionRewriter.VisitNodeOrToken(SyntaxNodeOrToken nodeOrToken, SemanticModel semanticModel, Boolean simplifyAllDescendants)\r\n 在 Microsoft.CodeAnalysis.Simplification.AbstractSimplificationService3.<>c__DisplayClass10_1.<<ReduceAsync>b__0>d.MoveNext()\\r\\n--- 引发异常的上一位置中堆栈跟踪的末尾 ---\\r\\n 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\\r\\n 在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\\r\\n 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n 在 Microsoft.CodeAnalysis.Simplification.AbstractSimplificationService3.d__9.MoveNext()\r\n--- 引发异常的上一位置中堆栈跟踪的末尾 ---\r\n 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n 在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n 在 Microsoft.CodeAnalysis.Simplification.AbstractSimplificationService3.<ReduceAsync>d__8.MoveNext()\\r\\n--- 引发异常的上一位置中堆栈跟踪的末尾 ---\\r\\n 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\\r\\n 在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\\r\\n 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n 在 Microsoft.CodeAnalysis.Simplification.Simplifier.<ReduceAsync>d__17.MoveNext()\\r\\n--- 引发异常的上一位置中堆栈跟踪的末尾 ---\\r\\n 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\\r\\n 在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\\r\\n 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n 在 Microsoft.CodeAnalysis.MetadataAsSource.AbstractMetadataAsSourceService.<AddSourceToAsync>d__4.MoveNext()\\r\\n--- 引发异常的上一位置中堆栈跟踪的末尾 ---\\r\\n 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\\r\\n 在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\\r\\n 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n 在 OmniSharp.Roslyn.MetadataExternalSourceService.<GetAndAddExternalSymbolDocument>d__4.MoveNext() 位置 D:\\\\a\\\\1\\\\s\\\\src\\\\OmniSharp.Roslyn\\\\MetadataExternalSourceService.cs:行号 63\\r\\n--- 引发异常的上一位置中堆栈跟踪的末尾 ---\\r\\n 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\\r\\n 在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\\r\\n 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n 在 OmniSharp.Roslyn.CSharp.Services.Navigation.GotoDefinitionService.<Handle>d__4.MoveNext() 位置 D:\\\\a\\\\1\\\\s\\\\src\\\\OmniSharp.Roslyn.CSharp\\\\Services\\\\Navigation\\\\GotoDefinitionService.cs:行号 73\\r\\n--- 引发异常的上一位置中堆栈跟踪的末尾 ---\\r\\n 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\\r\\n 在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\\r\\n 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n 在 OmniSharp.Endpoint.EndpointHandler2.d__19.MoveNext()\r\n--- 引发异常的上一位置中堆栈跟踪的末尾 ---\r\n 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n 在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n 在 OmniSharp.Endpoint.EndpointHandler2.<HandleRequestForLanguage>d__20.MoveNext() 位置 D:\\\\a\\\\1\\\\s\\\\src\\\\OmniSharp.Host\\\\Endpoint\\\\EndpointHandler.cs:行号 230\\r\\n--- 引发异常的上一位置中堆栈跟踪的末尾 ---\\r\\n 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\\r\\n 在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\\r\\n 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n 在 OmniSharp.Endpoint.EndpointHandler2.d__16.MoveNext() 位置 D:\\a\\1\\s\\src\\OmniSharp.Host\\Endpoint\\EndpointHandler.cs:行号 131\r\n--- 引发异常的上一位置中堆栈跟踪的末尾 ---\r\n 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n 在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n 在 OmniSharp.Stdio.Host.d__13.MoveNext() 位置 D:\\a\\1\\s\\src\\OmniSharp.Stdio\\Host.cs:行号 215"",
"Body": null,
"Seq": 224,
"Type": "response"
}
20201204123432---

@netzhouxinghong
Copy link
Author

I can't set the method you mentioned. This should be improved within the extended application.
There is another problem: it is not possible to jump directly back to the interface declaration from the implementation subclass.

您说的方法我无法设置,这个应该在扩展应用程序内部进行改进。
还有一个问题:无法从实现子类中直接跳转回接口声明。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant