You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current version of OmniSharp is crashing for a .NET 5.0 project when trying to autocomplete.
Reinstall of the extension as been tested. Using "omnisharp.path": "latest" bring the same error.
Here is the exception in english (exception in omnisharp logs is in french) :
System.InvalidCastException: Unable to cast object of type [A]System.Threading.Tasks.Task`1[System.ValueTuple`2[Microsoft.CodeAnalysis.Completion.CompletionList,System.Boolean]] to type [B]System.Threading.Tasks.Task`1[System.ValueTuple`2[Microsoft.CodeAnalysis.Completion.CompletionList,System.Boolean]]. Type A originates from 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' in the context 'LoadNeither' at location 'C:\\\\Windows\\\\Microsoft.Net\\\\assembly\\\\GAC_64\\\\mscorlib\\\\v4.0_4.0.0.0__b77a5c561934e089\\\\mscorlib.dll'. Type B originates from 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' in the context 'LoadNeither' at location 'C:\\\\Windows\\\\Microsoft.Net\\\\assembly\\\\GAC_64\\\\mscorlib\\\\v4.0_4.0.0.0__b77a5c561934e089\\\\mscorlib.dll'.
This exception is thrown for all /complete requests.
Steps to Reproduce
Create a new .NET 5.0 project and try to autocomplete usnig TAB.
Expected Behavior
Autocomplete should work.
Actual Behavior
Omnisharp crash and autocomplete does not fully work.
Logs
OmniSharp log
[warn]: OmniSharp.Stdio.Host
************ Request ************
{
"Type": "request",
"Seq": 1917,
"Command": "/completion",
"Arguments": {
"FileName": "c:\\src\\platform\\src\\JW.Platform.ImportCloudfrontRangesToVaultJob\\Job.cs",
"Line": 30,
"Column": 13,
"CompletionTrigger": 1
}
}
[fail]: OmniSharp.Stdio.Host
************ Response ************
{
"Request_seq": 1917,
"Command": "/completion",
"Running": true,
"Success": false,
"Message": "\"System.InvalidCastException: [A]System.Threading.Tasks.Task`1[System.ValueTuple`2[Microsoft.CodeAnalysis.Completion.CompletionList,System.Boolean]] ne peut pas être converti en [B]System.Threading.Tasks.Task`1[System.ValueTuple`2[Microsoft.CodeAnalysis.Completion.CompletionList,System.Boolean]]. Le type A provient de 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' dans le contexte 'LoadNeither' à l'emplacement 'C:\\\\Windows\\\\Microsoft.Net\\\\assembly\\\\GAC_64\\\\mscorlib\\\\v4.0_4.0.0.0__b77a5c561934e089\\\\mscorlib.dll'. Le type B provient de 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' dans le contexte 'LoadNeither' à l'emplacement 'C:\\\\Windows\\\\Microsoft.Net\\\\assembly\\\\GAC_64\\\\mscorlib\\\\v4.0_4.0.0.0__b77a5c561934e089\\\\mscorlib.dll'.\\r\\n à OmniSharp.Roslyn.CSharp.Services.Intellisense.CompletionItemExtensions.GetCompletionsInternalAsync(CompletionService completionService, Document document, Int32 caretPosition, CompletionTrigger trigger, ImmutableHashSet`1 roles, OptionSet options, CancellationToken cancellationToken) dans D:\\\\a\\\\1\\\\s\\\\src\\\\OmniSharp.Roslyn.CSharp\\\\Services\\\\Intellisense\\\\CompletionItemExtensions.cs:ligne 65\\r\\n à OmniSharp.Roslyn.CSharp.Services.Completion.CompletionService.d__7.MoveNext() dans D:\\\\a\\\\1\\\\s\\\\src\\\\OmniSharp.Roslyn.CSharp\\\\Services\\\\Completion\\\\CompletionService.cs:ligne 120\\r\\n--- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée ---\\r\\n à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\\r\\n à System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n à OmniSharp.Endpoint.EndpointHandler`2.d__19.MoveNext()\\r\\n--- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée ---\\r\\n à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\\r\\n à System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n à OmniSharp.Endpoint.EndpointHandler`2.d__20.MoveNext() dans D:\\\\a\\\\1\\\\s\\\\src\\\\OmniSharp.Host\\\\Endpoint\\\\EndpointHandler.cs:ligne 230\\r\\n--- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée ---\\r\\n à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\\r\\n à System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n à OmniSharp.Endpoint.EndpointHandler`2.d__16.MoveNext() dans D:\\\\a\\\\1\\\\s\\\\src\\\\OmniSharp.Host\\\\Endpoint\\\\EndpointHandler.cs:ligne 131\\r\\n--- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée ---\\r\\n à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\\r\\n à System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n à OmniSharp.Stdio.Host.d__13.MoveNext() dans D:\\\\a\\\\1\\\\s\\\\src\\\\OmniSharp.Stdio\\\\Host.cs:ligne 215\"",
"Body": null,
"Seq": 464062,
"Type": "response"
}
Environment information
VSCode version: 1.53.2 C# Extension: 1.23.9
Dotnet Information
SDK .NET (refl�tant tous les fichiers global.json)�:
Version: 5.0.103
Commit: 72dec52dbd
Environnement d'ex�cution�:
OS Name: Windows
OS Version: 10.0.18363
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\5.0.103\
Host (useful for support):
Version: 5.0.3
Commit: c636bbdc8a
@filipw I wondered the same when I saw the languages in other issues so I tried to change my system local to US but it did not change anything.
"System.InvalidCastException: [A]System.Threading.Tasks.Task`1[System.ValueTuple`2[Microsoft.CodeAnalysis.Completion.CompletionList,System.Boolean]] cannot be cast to [B]System.Threading.Tasks.Task`1[System.ValueTuple`2[Microsoft.CodeAnalysis.Completion.CompletionList,System.Boolean]]. Type A originates from 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' in the context 'LoadNeither' at location 'C:\\\\Windows\\\\Microsoft.Net\\\\assembly\\\\GAC_64\\\\mscorlib\\\\v4.0_4.0.0.0__b77a5c561934e089\\\\mscorlib.dll'. Type B originates from 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' in the context 'LoadNeither' at location 'C:\\\\Windows\\\\Microsoft.Net\\\\assembly\\\\GAC_64\\\\mscorlib\\\\v4.0_4.0.0.0__b77a5c561934e089\\\\mscorlib.dll'.\\r\\n
Please let me know if you want me to do some special testing ? Or if you want information from my machine !
Issue Description
The current version of OmniSharp is crashing for a .NET 5.0 project when trying to autocomplete.
Reinstall of the extension as been tested. Using
"omnisharp.path": "latest"
bring the same error.Here is the exception in english (exception in omnisharp logs is in french) :
This exception is thrown for all
/complete
requests.Steps to Reproduce
Create a new .NET 5.0 project and try to autocomplete usnig TAB.
Expected Behavior
Autocomplete should work.
Actual Behavior
Omnisharp crash and autocomplete does not fully work.
Logs
OmniSharp log
Environment information
VSCode version: 1.53.2
C# Extension: 1.23.9
Dotnet Information
SDK .NET (refl�tant tous les fichiers global.json)�: Version: 5.0.103 Commit: 72dec52dbdEnvironnement d'ex�cution�:
OS Name: Windows
OS Version: 10.0.18363
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\5.0.103\
Host (useful for support):
Version: 5.0.3
Commit: c636bbdc8a
.NET SDKs installed:
3.1.100 [C:\Program Files\dotnet\sdk]
3.1.402 [C:\Program Files\dotnet\sdk]
3.1.406 [C:\Program Files\dotnet\sdk]
5.0.102 [C:\Program Files\dotnet\sdk]
5.0.103 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.All 2.1.24 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.24 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.24 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.8 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.11 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.12 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download
Visual Studio Code Extensions
Related issues :
The text was updated successfully, but these errors were encountered: