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

Error in intelligent prompt #4437

Closed
Jnhi opened this issue Mar 12, 2021 · 2 comments
Closed

Error in intelligent prompt #4437

Jnhi opened this issue Mar 12, 2021 · 2 comments

Comments

@Jnhi
Copy link

Jnhi commented Mar 12, 2021

There was no problem using. Net 4.8 before. Net 4.7 was downloaded, and then the intelligent prompt could not be used. For example, when entering the first P in public, other methods would turn red, and then an error message was output

OmniSharp server started.
Path: c:\Users\Administrator.vscode\extensions\ms-dotnettools.csharp-1.23.9.omnisharp\1.37.6\OmniSharp.exe
PID: 45236

Starting OmniSharp on Windows 6.2.9200.0 (x64)
info: OmniSharp.Services.DotNetCliService
DotNetPath set to dotnet
info: OmniSharp.MSBuild.Discovery.MSBuildLocator
Located 2 MSBuild instance(s)
1: Visual Studio Community 2017 15.9.28307.1146 - "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin"
2: StandAlone 16.8.0 - "c:\Users\Administrator.vscode\extensions\ms-dotnettools.csharp-1.23.9.omnisharp\1.37.6.msbuild\Current\Bin"
[warn]: OmniSharp.CompositionHostBuilder
It looks like you have Visual Studio lower than VS 2019 16.3 installed.
Try updating Visual Studio to the most recent release to enable better MSBuild support.
info: OmniSharp.MSBuild.Discovery.MSBuildLocator
MSBUILD_EXE_PATH environment variable set to 'c:\Users\Administrator.vscode\extensions\ms-dotnettools.csharp-1.23.9.omnisharp\1.37.6.msbuild\Current\Bin\MSBuild.exe'
info: OmniSharp.MSBuild.Discovery.MSBuildLocator
Registered MSBuild instance: StandAlone 16.8.0 - "c:\Users\Administrator.vscode\extensions\ms-dotnettools.csharp-1.23.9.omnisharp\1.37.6.msbuild\Current\Bin"
CscToolExe = csc.exe
CscToolPath = c:\Users\Administrator.vscode\extensions\ms-dotnettools.csharp-1.23.9.omnisharp\1.37.6.msbuild\Current\Bin\Roslyn
MSBuildExtensionsPath = c:\Users\Administrator.vscode\extensions\ms-dotnettools.csharp-1.23.9.omnisharp\1.37.6.msbuild
MSBuildToolsPath = c:\Users\Administrator.vscode\extensions\ms-dotnettools.csharp-1.23.9.omnisharp\1.37.6.msbuild\Current\Bin
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.Completion.CompletionOptionsProvider, Order: 0
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.ImplementTypeWorkspaceOptionsProvider, Order: 110
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.BlockStructureWorkspaceOptionsProvider, Order: 140
info: OmniSharp.Cake.CakeProjectSystem
Detecting Cake files in 'e:\UnityGame\ConvertLua'.
info: OmniSharp.Cake.CakeProjectSystem
Could not find any Cake files
info: OmniSharp.MSBuild.ProjectSystem
Detecting projects in 'e:\UnityGame\ConvertLua\ConvertLua.sln'.
info: OmniSharp.MSBuild.ProjectManager
Queue project update for 'e:\UnityGame\ConvertLua\Assembly-CSharp.csproj'
info: OmniSharp.Script.ScriptProjectSystem
Detecting CSX files in 'e:\UnityGame\ConvertLua'.
info: OmniSharp.Script.ScriptProjectSystem
Could not find any CSX files
info: OmniSharp.WorkspaceInitializer
Configuration finished.
info: OmniSharp.Stdio.Host
Omnisharp server running using Stdio at location 'e:\UnityGame\ConvertLua' on host 240.
info: OmniSharp.MSBuild.ProjectManager
Loading project: e:\UnityGame\ConvertLua\Assembly-CSharp.csproj
info: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file 'e:\UnityGame\ConvertLua\Assembly-CSharp.csproj'.
info: OmniSharp.MSBuild.ProjectManager
Adding project 'e:\UnityGame\ConvertLua\Assembly-CSharp.csproj'
info: OmniSharp.MSBuild.ProjectManager
Update project: Assembly-CSharp
[warn]: OmniSharp.Stdio.Host
************ Request ************
{
"Type": "request",
"Seq": 20,
"Command": "/findusages",
"Arguments": {
"FileName": "e:\UnityGame\ConvertLua\Assets\Scenes\Button.cs",
"Line": 4,
"Column": 0,
"OnlyThisFile": true,
"ExcludeDefinition": false
}
}
[fail]: OmniSharp.Stdio.Host
************ Response ************
{
"Request_seq": 20,
"Command": "/findusages",
"Running": true,
"Success": false,
"Message": ""System.InvalidOperationException: Unexpected null\r\n 在 Roslyn.Utilities.Contract.Fail(String message)\r\n 在 Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.MapToAppropriateSymbol(ISymbol symbol)\r\n 在 Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.d__20.MoveNext()\r\n--- 引发异常的上一位置中堆栈跟踪的末尾 ---\r\n 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n 在 Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.d__19.MoveNext()\r\n--- 引发异常的上一位置中堆栈跟踪的末尾 ---\r\n 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n 在 Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.d__8.MoveNext()\r\n--- 引发异常的上一位置中堆栈跟踪的末尾 ---\r\n 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n 在 Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.d__8.MoveNext()\r\n--- 引发异常的上一位置中堆栈跟踪的末尾 ---\r\n 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n 在 Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.d__8.MoveNext()\r\n--- 引发异常的上一位置中堆栈跟踪的末尾 ---\r\n 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n 在 Microsoft.CodeAnalysis.FindSymbols.SymbolFinder.d__34.MoveNext()\r\n--- 引发异常的上一位置中堆栈跟踪的末尾 ---\r\n 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n 在 Microsoft.CodeAnalysis.FindSymbols.SymbolFinder.d__40.MoveNext()\r\n--- 引发异常的上一位置中堆栈跟踪的末尾 ---\r\n 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n 在 Microsoft.CodeAnalysis.FindSymbols.SymbolFinder.d__39.MoveNext()\r\n--- 引发异常的上一位置中堆栈跟踪的末尾 ---\r\n 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n 在 OmniSharp.Roslyn.CSharp.Services.Navigation.FindUsagesService.d__2.MoveNext() 位置 D:\\a\\1\\s\\src\\OmniSharp.Roslyn.CSharp\\Services\\Navigation\\FindUsagesService.cs:行号 41\r\n--- 引发异常的上一位置中堆栈跟踪的末尾 ---\r\n 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n 在 OmniSharp.Endpoint.EndpointHandler2.<AggregateResponsesFromLanguageHandlers>d__18.MoveNext()\\r\\n--- 引发异常的上一位置中堆栈跟踪的末尾 ---\\r\\n 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\\r\\n 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n 在 OmniSharp.Endpoint.EndpointHandler2.d__20.MoveNext() 位置 D:\\a\\1\\s\\src\\OmniSharp.Host\\Endpoint\\EndpointHandler.cs:行号 227\r\n--- 引发异常的上一位置中堆栈跟踪的末尾 ---\r\n 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n 在 OmniSharp.Endpoint.EndpointHandler2.<Process>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.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n 在 OmniSharp.Stdio.Host.<HandleRequest>d__13.MoveNext() 位置 D:\\\\a\\\\1\\\\s\\\\src\\\\OmniSharp.Stdio\\\\Host.cs:行号 215\"", "Body": null, "Seq": 474, "Type": "response" } Received response for /findusages but could not find request. Received response for /completion but could not find request. [warn]: OmniSharp.Stdio.Host ************ Request ************ { "Type": "request", "Seq": 50, "Command": "/findusages", "Arguments": { "FileName": "e:\\UnityGame\\ConvertLua\\Assets\\Scenes\\Button.cs", "Line": 8, "Column": 12, "OnlyThisFile": true, "ExcludeDefinition": false } } [fail]: OmniSharp.Stdio.Host ************ Response ************ { "Request_seq": 50, "Command": "/findusages", "Running": true, "Success": false, "Message": "\"System.InvalidOperationException: Unexpected null\\r\\n 在 Roslyn.Utilities.Contract.Fail(String message)\\r\\n 在 Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.MapToAppropriateSymbol(ISymbol symbol)\\r\\n 在 Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.<DetermineAllSymbolsCoreAsync>d__20.MoveNext()\\r\\n--- 引发异常的上一位置中堆栈跟踪的末尾 ---\\r\\n 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\\r\\n 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n 在 Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.<DetermineAllSymbolsAsync>d__19.MoveNext()\\r\\n--- 引发异常的上一位置中堆栈跟踪的末尾 ---\\r\\n 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\\r\\n 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n 在 Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.<FindReferencesAsync>d__8.MoveNext()\\r\\n--- 引发异常的上一位置中堆栈跟踪的末尾 ---\\r\\n 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\\r\\n 在 Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.<FindReferencesAsync>d__8.MoveNext()\\r\\n--- 引发异常的上一位置中堆栈跟踪的末尾 ---\\r\\n 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\\r\\n 在 Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.<FindReferencesAsync>d__8.MoveNext()\\r\\n--- 引发异常的上一位置中堆栈跟踪的末尾 ---\\r\\n 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\\r\\n 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n 在 Microsoft.CodeAnalysis.FindSymbols.SymbolFinder.<FindReferencesAsync>d__34.MoveNext()\\r\\n--- 引发异常的上一位置中堆栈跟踪的末尾 ---\\r\\n 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\\r\\n 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n 在 Microsoft.CodeAnalysis.FindSymbols.SymbolFinder.<FindReferencesAsync>d__40.MoveNext()\\r\\n--- 引发异常的上一位置中堆栈跟踪的末尾 ---\\r\\n 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\\r\\n 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n 在 Microsoft.CodeAnalysis.FindSymbols.SymbolFinder.<FindReferencesAsync>d__39.MoveNext()\\r\\n--- 引发异常的上一位置中堆栈跟踪的末尾 ---\\r\\n 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\\r\\n 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n 在 OmniSharp.Roslyn.CSharp.Services.Navigation.FindUsagesService.<Handle>d__2.MoveNext() 位置 D:\\\\a\\\\1\\\\s\\\\src\\\\OmniSharp.Roslyn.CSharp\\\\Services\\\\Navigation\\\\FindUsagesService.cs:行号 41\\r\\n--- 引发异常的上一位置中堆栈跟踪的末尾 ---\\r\\n 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\\r\\n 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n 在 OmniSharp.Endpoint.EndpointHandler2.d__18.MoveNext()\r\n--- 引发异常的上一位置中堆栈跟踪的末尾 ---\r\n 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\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:行号 227\\r\\n--- 引发异常的上一位置中堆栈跟踪的末尾 ---\\r\\n 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\\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.HandleNonSuccessAndDebuggerNotification(Task task)\r\n 在 OmniSharp.Stdio.Host.d__13.MoveNext() 位置 D:\\a\\1\\s\\src\\OmniSharp.Stdio\\Host.cs:行号 215"",
"Body": null,
"Seq": 1661,
"Type": "response"
}

@nohwnd
Copy link
Member

nohwnd commented Apr 22, 2021

Could you please confirm that this reproduces on the latest version of the extension for you? There were changes in the most recent version that should make this behave better. OmniSharp/omnisharp-roslyn#2054

@JoeRobich
Copy link
Member

Closing due to lack of response.

@JoeRobich JoeRobich closed this as not planned Won't fix, can't repro, duplicate, stale Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants