question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Syntax Highlighting Bug: Type names aren't coloured

See original GitHub issue

Issue Description

Apparently, a syntax highlighting bug with OmniSharp. I have a simple .cs file (see a screenshot below), where all type names are not coloured properly.

image

chsarp.semanticHighlighting.enabled and editor.semanticHighlighting.enabled are enabled.

Steps to Reproduce

Create a new .cs file with a class/record declaration, that has a few properties.

Expected Behavior

Type names should be blue.

Actual Behavior

Type names are white.

Logs

OmniSharp log

Starting OmniSharp server at 21/12/2020, 08:56:50 Target: /home/jrm/GIT/contentful-extractor/contentful-json-reducer

OmniSharp server started. Path: /home/jrm/.vscode/extensions/ms-dotnettools.csharp-1.23.8/.omnisharp/1.37.5/run PID: 16048

    Starting OmniSharp on debian 10.0 (x64)
    DotNetPath set to dotnet
    Located 1 MSBuild instance(s)
        1: StandAlone 16.8.0 - "/home/jrm/.vscode/extensions/ms-dotnettools.csharp-1.23.8/.omnisharp/1.37.5/omnisharp/.msbuild/Current/Bin"
    MSBUILD_EXE_PATH environment variable set to '/home/jrm/.vscode/extensions/ms-dotnettools.csharp-1.23.8/.omnisharp/1.37.5/omnisharp/.msbuild/Current/Bin/MSBuild.exe'
    Registered MSBuild instance: StandAlone 16.8.0 - "/home/jrm/.vscode/extensions/ms-dotnettools.csharp-1.23.8/.omnisharp/1.37.5/omnisharp/.msbuild/Current/Bin"
        CscToolExe = csc.exe
        MSBuildToolsPath = /home/jrm/.vscode/extensions/ms-dotnettools.csharp-1.23.8/.omnisharp/1.37.5/omnisharp/.msbuild/Current/Bin
        CscToolPath = /home/jrm/.vscode/extensions/ms-dotnettools.csharp-1.23.8/.omnisharp/1.37.5/omnisharp/.msbuild/Current/Bin/Roslyn
        BypassFrameworkInstallChecks = true
        MSBuildExtensionsPath = /home/jrm/.vscode/extensions/ms-dotnettools.csharp-1.23.8/.omnisharp/1.37.5/omnisharp/.msbuild
    Detecting Cake files in '/home/jrm/GIT/contentful-extractor/contentful-json-reducer'.
    Could not find any Cake files
    No solution files found in '/home/jrm/GIT/contentful-extractor/contentful-json-reducer'
    Queue project update for '/home/jrm/GIT/contentful-extractor/contentful-json-reducer/contentful-json-reducer.csproj'
    Detecting CSX files in '/home/jrm/GIT/contentful-extractor/contentful-json-reducer'.
    Loading project: /home/jrm/GIT/contentful-extractor/contentful-json-reducer/contentful-json-reducer.csproj
    Could not find any CSX files
    Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
    Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.Completion.CompletionOptionsProvider, Order: 0
    Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100
    Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.ImplementTypeWorkspaceOptionsProvider, Order: 110
    Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.BlockStructureWorkspaceOptionsProvider, Order: 140
    Configuration finished.
    Omnisharp server running using Stdio at location '/home/jrm/GIT/contentful-extractor/contentful-json-reducer' on host 15940.
    Successfully loaded project file '/home/jrm/GIT/contentful-extractor/contentful-json-reducer/contentful-json-reducer.csproj'.
    Adding project '/home/jrm/GIT/contentful-extractor/contentful-json-reducer/contentful-json-reducer.csproj'
    Update project: contentful-json-reducer
    ************  Response ************ 

{ “Request_seq”: 107, “Command”: “/findusages”, “Running”: true, “Success”: false, “Message”: “"System.InvalidOperationException: Unexpected null\n at Roslyn.Utilities.Contract.Fail (System.String message) [0x00000] in <1b72cf009970430282a46c2931a92a23>:0 \n at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.MapToAppropriateSymbol (Microsoft.CodeAnalysis.ISymbol symbol) [0x0003a] in <1b72cf009970430282a46c2931a92a23>:0 \n at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.DetermineAllSymbolsCoreAsync (Microsoft.CodeAnalysis.ISymbol symbol, Roslyn.Utilities.ConcurrentSet1[T] result) [0x0005b] in <1b72cf009970430282a46c2931a92a23>:0 \\n at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.DetermineAllSymbolsAsync (Microsoft.CodeAnalysis.ISymbol symbol) [0x0009f] in <1b72cf009970430282a46c2931a92a23>:0 \\n at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol) [0x001d5] in <1b72cf009970430282a46c2931a92a23>:0 \\n at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol) [0x003ba] in <1b72cf009970430282a46c2931a92a23>:0 \\n at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol) [0x00463] in <1b72cf009970430282a46c2931a92a23>:0 \\n at Microsoft.CodeAnalysis.FindSymbols.SymbolFinder.FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol, Microsoft.CodeAnalysis.Solution solution, Microsoft.CodeAnalysis.FindSymbols.IStreamingFindReferencesProgress progress, System.Collections.Immutable.IImmutableSet1[T] documents, Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchOptions options, System.Threading.CancellationToken cancellationToken) [0x00267] in <1b72cf009970430282a46c2931a92a23>:0 \n at Microsoft.CodeAnalysis.FindSymbols.SymbolFinder.FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol, Microsoft.CodeAnalysis.Solution solution, Microsoft.CodeAnalysis.FindSymbols.IFindReferencesProgress progress, System.Collections.Immutable.IImmutableSet1[T] documents, Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchOptions options, System.Threading.CancellationToken cancellationToken) [0x000b3] in <1b72cf009970430282a46c2931a92a23>:0 \\n at Microsoft.CodeAnalysis.FindSymbols.SymbolFinder.FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol, Microsoft.CodeAnalysis.Solution solution, Microsoft.CodeAnalysis.FindSymbols.IFindReferencesProgress progress, System.Collections.Immutable.IImmutableSet1[T] documents, System.Threading.CancellationToken cancellationToken) [0x00086] in <1b72cf009970430282a46c2931a92a23>:0 \n at OmniSharp.Roslyn.CSharp.Services.Navigation.FindUsagesService.Handle (OmniSharp.Models.FindUsages.FindUsagesRequest request) [0x00390] in <88f2819c12ee464e94d6700e849310cf>:0 \n at OmniSharp.Endpoint.EndpointHandler2[TRequest,TResponse].AggregateResponsesFromLanguageHandlers (OmniSharp.Endpoint.Exports.ExportHandler2[TRequest,TResponse][] handlers, TRequest request) [0x000a9] in <954ed0cf974c4f038a543c1ed1dfaa98>:0 \n at OmniSharp.Endpoint.EndpointHandler2[TRequest,TResponse].HandleRequestForLanguage (System.String language, TRequest request, OmniSharp.Protocol.RequestPacket packet) [0x000fb] in <954ed0cf974c4f038a543c1ed1dfaa98>:0 \\n at OmniSharp.Endpoint.EndpointHandler2[TRequest,TResponse].Process (OmniSharp.Protocol.RequestPacket packet, OmniSharp.Endpoint.LanguageModel model, Newtonsoft.Json.Linq.JToken requestObject) [0x0024b] in <954ed0cf974c4f038a543c1ed1dfaa98>:0 \n at OmniSharp.Stdio.Host.HandleRequest (System.String json, Microsoft.Extensions.Logging.ILogger logger) [0x000e7] in <60d68949688146858c57cddcbc6c56f5>:0 "”, “Body”: null, “Seq”: 3343, “Type”: “response” } fail: OmniSharp.Stdio.Host ************ Response ************ { “Request_seq”: 442, “Command”: “/findusages”, “Running”: true, “Success”: false, “Message”: “"System.InvalidOperationException: Unexpected null\n at Roslyn.Utilities.Contract.Fail (System.String message) [0x00000] in <1b72cf009970430282a46c2931a92a23>:0 \n at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.MapToAppropriateSymbol (Microsoft.CodeAnalysis.ISymbol symbol) [0x0003a] in <1b72cf009970430282a46c2931a92a23>:0 \n at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.DetermineAllSymbolsCoreAsync (Microsoft.CodeAnalysis.ISymbol symbol, Roslyn.Utilities.ConcurrentSet1[T] result) [0x0005b] in <1b72cf009970430282a46c2931a92a23>:0 \\n at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.DetermineAllSymbolsAsync (Microsoft.CodeAnalysis.ISymbol symbol) [0x0009f] in <1b72cf009970430282a46c2931a92a23>:0 \\n at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol) [0x001d5] in <1b72cf009970430282a46c2931a92a23>:0 \\n at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol) [0x003ba] in <1b72cf009970430282a46c2931a92a23>:0 \\n at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol) [0x00463] in <1b72cf009970430282a46c2931a92a23>:0 \\n at Microsoft.CodeAnalysis.FindSymbols.SymbolFinder.FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol, Microsoft.CodeAnalysis.Solution solution, Microsoft.CodeAnalysis.FindSymbols.IStreamingFindReferencesProgress progress, System.Collections.Immutable.IImmutableSet1[T] documents, Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchOptions options, System.Threading.CancellationToken cancellationToken) [0x00267] in <1b72cf009970430282a46c2931a92a23>:0 \n at Microsoft.CodeAnalysis.FindSymbols.SymbolFinder.FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol, Microsoft.CodeAnalysis.Solution solution, Microsoft.CodeAnalysis.FindSymbols.IFindReferencesProgress progress, System.Collections.Immutable.IImmutableSet1[T] documents, Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchOptions options, System.Threading.CancellationToken cancellationToken) [0x000b3] in <1b72cf009970430282a46c2931a92a23>:0 \\n at Microsoft.CodeAnalysis.FindSymbols.SymbolFinder.FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol, Microsoft.CodeAnalysis.Solution solution, Microsoft.CodeAnalysis.FindSymbols.IFindReferencesProgress progress, System.Collections.Immutable.IImmutableSet1[T] documents, System.Threading.CancellationToken cancellationToken) [0x00086] in <1b72cf009970430282a46c2931a92a23>:0 \n at OmniSharp.Roslyn.CSharp.Services.Navigation.FindUsagesService.Handle (OmniSharp.Models.FindUsages.FindUsagesRequest request) [0x00390] in <88f2819c12ee464e94d6700e849310cf>:0 \n at OmniSharp.Endpoint.EndpointHandler2[TRequest,TResponse].AggregateResponsesFromLanguageHandlers (OmniSharp.Endpoint.Exports.ExportHandler2[TRequest,TResponse][] handlers, TRequest request) [0x000a9] in <954ed0cf974c4f038a543c1ed1dfaa98>:0 \n at OmniSharp.Endpoint.EndpointHandler2[TRequest,TResponse].HandleRequestForLanguage (System.String language, TRequest request, OmniSharp.Protocol.RequestPacket packet) [0x000fb] in <954ed0cf974c4f038a543c1ed1dfaa98>:0 \\n at OmniSharp.Endpoint.EndpointHandler2[TRequest,TResponse].Process (OmniSharp.Protocol.RequestPacket packet, OmniSharp.Endpoint.LanguageModel model, Newtonsoft.Json.Linq.JToken requestObject) [0x0024b] in <954ed0cf974c4f038a543c1ed1dfaa98>:0 \n at OmniSharp.Stdio.Host.HandleRequest (System.String json, Microsoft.Extensions.Logging.ILogger logger) [0x000e7] in <60d68949688146858c57cddcbc6c56f5>:0 "”, “Body”: null, “Seq”: 4259, “Type”: “response” } fail: OmniSharp.Stdio.Host ************ Response ************ { “Request_seq”: 445, “Command”: “/findusages”, “Running”: true, “Success”: false, “Message”: “"System.InvalidOperationException: Unexpected null\n at Roslyn.Utilities.Contract.Fail (System.String message) [0x00000] in <1b72cf009970430282a46c2931a92a23>:0 \n at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.MapToAppropriateSymbol (Microsoft.CodeAnalysis.ISymbol symbol) [0x0003a] in <1b72cf009970430282a46c2931a92a23>:0 \n at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.DetermineAllSymbolsCoreAsync (Microsoft.CodeAnalysis.ISymbol symbol, Roslyn.Utilities.ConcurrentSet1[T] result) [0x0005b] in <1b72cf009970430282a46c2931a92a23>:0 \\n at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.DetermineAllSymbolsAsync (Microsoft.CodeAnalysis.ISymbol symbol) [0x0009f] in <1b72cf009970430282a46c2931a92a23>:0 \\n at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol) [0x001d5] in <1b72cf009970430282a46c2931a92a23>:0 \\n at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol) [0x003ba] in <1b72cf009970430282a46c2931a92a23>:0 \\n at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol) [0x00463] in <1b72cf009970430282a46c2931a92a23>:0 \\n at Microsoft.CodeAnalysis.FindSymbols.SymbolFinder.FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol, Microsoft.CodeAnalysis.Solution solution, Microsoft.CodeAnalysis.FindSymbols.IStreamingFindReferencesProgress progress, System.Collections.Immutable.IImmutableSet1[T] documents, Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchOptions options, System.Threading.CancellationToken cancellationToken) [0x00267] in <1b72cf009970430282a46c2931a92a23>:0 \n at Microsoft.CodeAnalysis.FindSymbols.SymbolFinder.FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol, Microsoft.CodeAnalysis.Solution solution, Microsoft.CodeAnalysis.FindSymbols.IFindReferencesProgress progress, System.Collections.Immutable.IImmutableSet1[T] documents, Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchOptions options, System.Threading.CancellationToken cancellationToken) [0x000b3] in <1b72cf009970430282a46c2931a92a23>:0 \\n at Microsoft.CodeAnalysis.FindSymbols.SymbolFinder.FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol, Microsoft.CodeAnalysis.Solution solution, Microsoft.CodeAnalysis.FindSymbols.IFindReferencesProgress progress, System.Collections.Immutable.IImmutableSet1[T] documents, System.Threading.CancellationToken cancellationToken) [0x00086] in <1b72cf009970430282a46c2931a92a23>:0 \n at OmniSharp.Roslyn.CSharp.Services.Navigation.FindUsagesService.Handle (OmniSharp.Models.FindUsages.FindUsagesRequest request) [0x00390] in <88f2819c12ee464e94d6700e849310cf>:0 \n at OmniSharp.Endpoint.EndpointHandler2[TRequest,TResponse].AggregateResponsesFromLanguageHandlers (OmniSharp.Endpoint.Exports.ExportHandler2[TRequest,TResponse][] handlers, TRequest request) [0x000a9] in <954ed0cf974c4f038a543c1ed1dfaa98>:0 \n at OmniSharp.Endpoint.EndpointHandler2[TRequest,TResponse].HandleRequestForLanguage (System.String language, TRequest request, OmniSharp.Protocol.RequestPacket packet) [0x000fb] in <954ed0cf974c4f038a543c1ed1dfaa98>:0 \\n at OmniSharp.Endpoint.EndpointHandler2[TRequest,TResponse].Process (OmniSharp.Protocol.RequestPacket packet, OmniSharp.Endpoint.LanguageModel model, Newtonsoft.Json.Linq.JToken requestObject) [0x0024b] in <954ed0cf974c4f038a543c1ed1dfaa98>:0 \n at OmniSharp.Stdio.Host.HandleRequest (System.String json, Microsoft.Extensions.Logging.ILogger logger) [0x000e7] in <60d68949688146858c57cddcbc6c56f5>:0 "”, “Body”: null, “Seq”: 4284, “Type”: “response” } fail: OmniSharp.Stdio.Host ************ Response ************ { “Request_seq”: 853, “Command”: “/findusages”, “Running”: true, “Success”: false, “Message”: “"System.InvalidOperationException: Unexpected null\n at Roslyn.Utilities.Contract.Fail (System.String message) [0x00000] in <1b72cf009970430282a46c2931a92a23>:0 \n at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.MapToAppropriateSymbol (Microsoft.CodeAnalysis.ISymbol symbol) [0x0003a] in <1b72cf009970430282a46c2931a92a23>:0 \n at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.DetermineAllSymbolsCoreAsync (Microsoft.CodeAnalysis.ISymbol symbol, Roslyn.Utilities.ConcurrentSet1[T] result) [0x0005b] in <1b72cf009970430282a46c2931a92a23>:0 \\n at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.DetermineAllSymbolsAsync (Microsoft.CodeAnalysis.ISymbol symbol) [0x0009f] in <1b72cf009970430282a46c2931a92a23>:0 \\n at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol) [0x001d5] in <1b72cf009970430282a46c2931a92a23>:0 \\n at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol) [0x003ba] in <1b72cf009970430282a46c2931a92a23>:0 \\n at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol) [0x00463] in <1b72cf009970430282a46c2931a92a23>:0 \\n at Microsoft.CodeAnalysis.FindSymbols.SymbolFinder.FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol, Microsoft.CodeAnalysis.Solution solution, Microsoft.CodeAnalysis.FindSymbols.IStreamingFindReferencesProgress progress, System.Collections.Immutable.IImmutableSet1[T] documents, Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchOptions options, System.Threading.CancellationToken cancellationToken) [0x00267] in <1b72cf009970430282a46c2931a92a23>:0 \n at Microsoft.CodeAnalysis.FindSymbols.SymbolFinder.FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol, Microsoft.CodeAnalysis.Solution solution, Microsoft.CodeAnalysis.FindSymbols.IFindReferencesProgress progress, System.Collections.Immutable.IImmutableSet1[T] documents, Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchOptions options, System.Threading.CancellationToken cancellationToken) [0x000b3] in <1b72cf009970430282a46c2931a92a23>:0 \\n at Microsoft.CodeAnalysis.FindSymbols.SymbolFinder.FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol, Microsoft.CodeAnalysis.Solution solution, Microsoft.CodeAnalysis.FindSymbols.IFindReferencesProgress progress, System.Collections.Immutable.IImmutableSet1[T] documents, System.Threading.CancellationToken cancellationToken) [0x00086] in <1b72cf009970430282a46c2931a92a23>:0 \n at OmniSharp.Roslyn.CSharp.Services.Navigation.FindUsagesService.Handle (OmniSharp.Models.FindUsages.FindUsagesRequest request) [0x00390] in <88f2819c12ee464e94d6700e849310cf>:0 \n at OmniSharp.Endpoint.EndpointHandler2[TRequest,TResponse].AggregateResponsesFromLanguageHandlers (OmniSharp.Endpoint.Exports.ExportHandler2[TRequest,TResponse][] handlers, TRequest request) [0x000a9] in <954ed0cf974c4f038a543c1ed1dfaa98>:0 \n at OmniSharp.Endpoint.EndpointHandler2[TRequest,TResponse].HandleRequestForLanguage (System.String language, TRequest request, OmniSharp.Protocol.RequestPacket packet) [0x000fb] in <954ed0cf974c4f038a543c1ed1dfaa98>:0 \\n at OmniSharp.Endpoint.EndpointHandler2[TRequest,TResponse].Process (OmniSharp.Protocol.RequestPacket packet, OmniSharp.Endpoint.LanguageModel model, Newtonsoft.Json.Linq.JToken requestObject) [0x0024b] in <954ed0cf974c4f038a543c1ed1dfaa98>:0 \n at OmniSharp.Stdio.Host.HandleRequest (System.String json, Microsoft.Extensions.Logging.ILogger logger) [0x000e7] in <60d68949688146858c57cddcbc6c56f5>:0 "”, “Body”: null, “Seq”: 5483, “Type”: “response” } info: OmniSharp.Roslyn.CSharp.Services.Refactoring.V2.RunCodeActionService Applying code action: Generate method ‘CRCReducer.generateFileHashes’ fail: OmniSharp.Stdio.Host ************ Response ************ { “Request_seq”: 1073, “Command”: “/findusages”, “Running”: true, “Success”: false, “Message”: “"System.InvalidOperationException: Unexpected null\n at Roslyn.Utilities.Contract.Fail (System.String message) [0x00000] in <1b72cf009970430282a46c2931a92a23>:0 \n at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.MapToAppropriateSymbol (Microsoft.CodeAnalysis.ISymbol symbol) [0x0003a] in <1b72cf009970430282a46c2931a92a23>:0 \n at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.DetermineAllSymbolsCoreAsync (Microsoft.CodeAnalysis.ISymbol symbol, Roslyn.Utilities.ConcurrentSet1[T] result) [0x0005b] in <1b72cf009970430282a46c2931a92a23>:0 \\n at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.DetermineAllSymbolsAsync (Microsoft.CodeAnalysis.ISymbol symbol) [0x0009f] in <1b72cf009970430282a46c2931a92a23>:0 \\n at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol) [0x001d5] in <1b72cf009970430282a46c2931a92a23>:0 \\n at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol) [0x003ba] in <1b72cf009970430282a46c2931a92a23>:0 \\n at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol) [0x00463] in <1b72cf009970430282a46c2931a92a23>:0 \\n at Microsoft.CodeAnalysis.FindSymbols.SymbolFinder.FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol, Microsoft.CodeAnalysis.Solution solution, Microsoft.CodeAnalysis.FindSymbols.IStreamingFindReferencesProgress progress, System.Collections.Immutable.IImmutableSet1[T] documents, Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchOptions options, System.Threading.CancellationToken cancellationToken) [0x00267] in <1b72cf009970430282a46c2931a92a23>:0 \n at Microsoft.CodeAnalysis.FindSymbols.SymbolFinder.FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol, Microsoft.CodeAnalysis.Solution solution, Microsoft.CodeAnalysis.FindSymbols.IFindReferencesProgress progress, System.Collections.Immutable.IImmutableSet1[T] documents, Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchOptions options, System.Threading.CancellationToken cancellationToken) [0x000b3] in <1b72cf009970430282a46c2931a92a23>:0 \\n at Microsoft.CodeAnalysis.FindSymbols.SymbolFinder.FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol, Microsoft.CodeAnalysis.Solution solution, Microsoft.CodeAnalysis.FindSymbols.IFindReferencesProgress progress, System.Collections.Immutable.IImmutableSet1[T] documents, System.Threading.CancellationToken cancellationToken) [0x00086] in <1b72cf009970430282a46c2931a92a23>:0 \n at OmniSharp.Roslyn.CSharp.Services.Navigation.FindUsagesService.Handle (OmniSharp.Models.FindUsages.FindUsagesRequest request) [0x00390] in <88f2819c12ee464e94d6700e849310cf>:0 \n at OmniSharp.Endpoint.EndpointHandler2[TRequest,TResponse].AggregateResponsesFromLanguageHandlers (OmniSharp.Endpoint.Exports.ExportHandler2[TRequest,TResponse][] handlers, TRequest request) [0x000a9] in <954ed0cf974c4f038a543c1ed1dfaa98>:0 \n at OmniSharp.Endpoint.EndpointHandler2[TRequest,TResponse].HandleRequestForLanguage (System.String language, TRequest request, OmniSharp.Protocol.RequestPacket packet) [0x000fb] in <954ed0cf974c4f038a543c1ed1dfaa98>:0 \\n at OmniSharp.Endpoint.EndpointHandler2[TRequest,TResponse].Process (OmniSharp.Protocol.RequestPacket packet, OmniSharp.Endpoint.LanguageModel model, Newtonsoft.Json.Linq.JToken requestObject) [0x0024b] in <954ed0cf974c4f038a543c1ed1dfaa98>:0 \n at OmniSharp.Stdio.Host.HandleRequest (System.String json, Microsoft.Extensions.Logging.ILogger logger) [0x000e7] in <60d68949688146858c57cddcbc6c56f5>:0 "”, “Body”: null, “Seq”: 6072, “Type”: “response” } fail: OmniSharp.Stdio.Host ************ Response ************ { “Request_seq”: 1094, “Command”: “/findusages”, “Running”: true, “Success”: false, “Message”: “"System.InvalidOperationException: Unexpected null\n at Roslyn.Utilities.Contract.Fail (System.String message) [0x00000] in <1b72cf009970430282a46c2931a92a23>:0 \n at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.MapToAppropriateSymbol (Microsoft.CodeAnalysis.ISymbol symbol) [0x0003a] in <1b72cf009970430282a46c2931a92a23>:0 \n at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.DetermineAllSymbolsCoreAsync (Microsoft.CodeAnalysis.ISymbol symbol, Roslyn.Utilities.ConcurrentSet1[T] result) [0x0005b] in <1b72cf009970430282a46c2931a92a23>:0 \\n at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.DetermineAllSymbolsAsync (Microsoft.CodeAnalysis.ISymbol symbol) [0x0009f] in <1b72cf009970430282a46c2931a92a23>:0 \\n at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol) [0x001d5] in <1b72cf009970430282a46c2931a92a23>:0 \\n at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol) [0x003ba] in <1b72cf009970430282a46c2931a92a23>:0 \\n at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol) [0x00463] in <1b72cf009970430282a46c2931a92a23>:0 \\n at Microsoft.CodeAnalysis.FindSymbols.SymbolFinder.FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol, Microsoft.CodeAnalysis.Solution solution, Microsoft.CodeAnalysis.FindSymbols.IStreamingFindReferencesProgress progress, System.Collections.Immutable.IImmutableSet1[T] documents, Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchOptions options, System.Threading.CancellationToken cancellationToken) [0x00267] in <1b72cf009970430282a46c2931a92a23>:0 \n at Microsoft.CodeAnalysis.FindSymbols.SymbolFinder.FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol, Microsoft.CodeAnalysis.Solution solution, Microsoft.CodeAnalysis.FindSymbols.IFindReferencesProgress progress, System.Collections.Immutable.IImmutableSet1[T] documents, Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchOptions options, System.Threading.CancellationToken cancellationToken) [0x000b3] in <1b72cf009970430282a46c2931a92a23>:0 \\n at Microsoft.CodeAnalysis.FindSymbols.SymbolFinder.FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol, Microsoft.CodeAnalysis.Solution solution, Microsoft.CodeAnalysis.FindSymbols.IFindReferencesProgress progress, System.Collections.Immutable.IImmutableSet1[T] documents, System.Threading.CancellationToken cancellationToken) [0x00086] in <1b72cf009970430282a46c2931a92a23>:0 \n at OmniSharp.Roslyn.CSharp.Services.Navigation.FindUsagesService.Handle (OmniSharp.Models.FindUsages.FindUsagesRequest request) [0x00390] in <88f2819c12ee464e94d6700e849310cf>:0 \n at OmniSharp.Endpoint.EndpointHandler2[TRequest,TResponse].AggregateResponsesFromLanguageHandlers (OmniSharp.Endpoint.Exports.ExportHandler2[TRequest,TResponse][] handlers, TRequest request) [0x000a9] in <954ed0cf974c4f038a543c1ed1dfaa98>:0 \n at OmniSharp.Endpoint.EndpointHandler2[TRequest,TResponse].HandleRequestForLanguage (System.String language, TRequest request, OmniSharp.Protocol.RequestPacket packet) [0x000fb] in <954ed0cf974c4f038a543c1ed1dfaa98>:0 \\n at OmniSharp.Endpoint.EndpointHandler2[TRequest,TResponse].Process (OmniSharp.Protocol.RequestPacket packet, OmniSharp.Endpoint.LanguageModel model, Newtonsoft.Json.Linq.JToken requestObject) [0x0024b] in <954ed0cf974c4f038a543c1ed1dfaa98>:0 \n at OmniSharp.Stdio.Host.HandleRequest (System.String json, Microsoft.Extensions.Logging.ILogger logger) [0x000e7] in <60d68949688146858c57cddcbc6c56f5>:0 "”, “Body”: null, “Seq”: 6126, “Type”: “response” } fail: OmniSharp.Stdio.Host ************ Response ************ { “Request_seq”: 1134, “Command”: “/findusages”, “Running”: true, “Success”: false, “Message”: “"System.InvalidOperationException: Unexpected null\n at Roslyn.Utilities.Contract.Fail (System.String message) [0x00000] in <1b72cf009970430282a46c2931a92a23>:0 \n at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.MapToAppropriateSymbol (Microsoft.CodeAnalysis.ISymbol symbol) [0x0003a] in <1b72cf009970430282a46c2931a92a23>:0 \n at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.DetermineAllSymbolsCoreAsync (Microsoft.CodeAnalysis.ISymbol symbol, Roslyn.Utilities.ConcurrentSet1[T] result) [0x0005b] in <1b72cf009970430282a46c2931a92a23>:0 \\n at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.DetermineAllSymbolsAsync (Microsoft.CodeAnalysis.ISymbol symbol) [0x0009f] in <1b72cf009970430282a46c2931a92a23>:0 \\n at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol) [0x001d5] in <1b72cf009970430282a46c2931a92a23>:0 \\n at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol) [0x003ba] in <1b72cf009970430282a46c2931a92a23>:0 \\n at Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchEngine.FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol) [0x00463] in <1b72cf009970430282a46c2931a92a23>:0 \\n at Microsoft.CodeAnalysis.FindSymbols.SymbolFinder.FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol, Microsoft.CodeAnalysis.Solution solution, Microsoft.CodeAnalysis.FindSymbols.IStreamingFindReferencesProgress progress, System.Collections.Immutable.IImmutableSet1[T] documents, Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchOptions options, System.Threading.CancellationToken cancellationToken) [0x00267] in <1b72cf009970430282a46c2931a92a23>:0 \n at Microsoft.CodeAnalysis.FindSymbols.SymbolFinder.FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol, Microsoft.CodeAnalysis.Solution solution, Microsoft.CodeAnalysis.FindSymbols.IFindReferencesProgress progress, System.Collections.Immutable.IImmutableSet1[T] documents, Microsoft.CodeAnalysis.FindSymbols.FindReferencesSearchOptions options, System.Threading.CancellationToken cancellationToken) [0x000b3] in <1b72cf009970430282a46c2931a92a23>:0 \\n at Microsoft.CodeAnalysis.FindSymbols.SymbolFinder.FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol, Microsoft.CodeAnalysis.Solution solution, Microsoft.CodeAnalysis.FindSymbols.IFindReferencesProgress progress, System.Collections.Immutable.IImmutableSet1[T] documents, System.Threading.CancellationToken cancellationToken) [0x00086] in <1b72cf009970430282a46c2931a92a23>:0 \n at OmniSharp.Roslyn.CSharp.Services.Navigation.FindUsagesService.Handle (OmniSharp.Models.FindUsages.FindUsagesRequest request) [0x00390] in <88f2819c12ee464e94d6700e849310cf>:0 \n at OmniSharp.Endpoint.EndpointHandler2[TRequest,TResponse].AggregateResponsesFromLanguageHandlers (OmniSharp.Endpoint.Exports.ExportHandler2[TRequest,TResponse][] handlers, TRequest request) [0x000a9] in <954ed0cf974c4f038a543c1ed1dfaa98>:0 \n at OmniSharp.Endpoint.EndpointHandler2[TRequest,TResponse].HandleRequestForLanguage (System.String language, TRequest request, OmniSharp.Protocol.RequestPacket packet) [0x000fb] in <954ed0cf974c4f038a543c1ed1dfaa98>:0 \\n at OmniSharp.Endpoint.EndpointHandler2[TRequest,TResponse].Process (OmniSharp.Protocol.RequestPacket packet, OmniSharp.Endpoint.LanguageModel model, Newtonsoft.Json.Linq.JToken requestObject) [0x0024b] in <954ed0cf974c4f038a543c1ed1dfaa98>:0 \n at OmniSharp.Stdio.Host.HandleRequest (System.String json, Microsoft.Extensions.Logging.ILogger logger) [0x000e7] in <60d68949688146858c57cddcbc6c56f5>:0 "”, “Body”: null, “Seq”: 6264, “Type”: “response” }

C# log

Empty output

Environment information

VSCode version: 1.52.1 C# Extension: 1.23.8

Mono Information OmniSharp using built-in mono
Dotnet Information .NET SDK (reflecting any global.json): Version: 5.0.101 Commit: d05174dc5a

Runtime Environment: OS Name: debian OS Version: 10 OS Platform: Linux RID: debian.10-x64 Base Path: /usr/share/dotnet/sdk/5.0.101/

Host (useful for support): Version: 5.0.1 Commit: b02e13abab

.NET SDKs installed: 3.1.404 [/usr/share/dotnet/sdk] 5.0.101 [/usr/share/dotnet/sdk]

.NET runtimes installed: Microsoft.AspNetCore.App 3.1.10 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 5.0.1 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 3.1.10 [/usr/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 5.0.1 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET runtimes or SDKs: https://aka.ms/dotnet-download

Visual Studio Code Extensions
Extension Author Version
blazorsnippets ScottSauber 1.3.0
csharp ms-dotnettools 1.23.8
es7-react-js-snippets dsznajder 3.1.0
jbockle-format-files jbockle 3.0.0
theme-dracula dracula-theme 2.22.3
transformer dakara 1.11.0
vscode-css-formatter aeschli 1.0.1
vscode-peacock johnpapa 3.9.1

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
filipwcommented, Feb 8, 2021

To enable it set: csharp.semanticHighlighting.enabled and editor.semanticHighlighting.enabled to true.

1reaction
filipwcommented, Dec 28, 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

Python Syntax highlighting/colors are still broken? #65713
I see no way to modify JUST the syntax color scheme in VSCode. Sublime and Atom do not have that problem. No matter...
Read more >
Visual Studio Code syntax highlighting is not working for ...
I think this was caused by the extension called JavaScript and TypeScript Nightly. This was causing the syntax highlighting for .js and .ts ......
Read more >
Problem with syntax highlight - code is not colored consistently
The issue I have is that whatever theme I choose many elements are still left white. What's worse, the coloring is inconsistent: ie...
Read more >
A case against syntax highlighting - Linus Åkesson
Feel free to not use syntax highlighting, but if you work for me and I find a bug that would never have been...
Read more >
Optimizations in Syntax Highlighting, a Visual Studio Code Story
Tokens are assigned to source code, and then they are targeted by a theme, assigned colors, and voilà, your source code is rendered...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found