vscode-csharp: C# Extension Stopped Working on Linux

Issue Description

C# extension stopped working properly on Linux. I’ve been using this development environment for nearly a year without issues, and today all the sudden it won’t work. I see some errors logged in the Omnisharp console, and I cannot navigate through my project by ctrl+clicking on types as I used to be. This is probably due to some component update, but I don’t know which.

VSCode also shows a pop up time to time with the error: “Some projects have trouble loading. Please review the output for more details.”

Logs

OmniSharp log

Starting OmniSharp server at 5/9/2019, 3:39:37 PM
    Target: /usr/local/google/home/hkj/Projects/firebase-admin-dotnet/temp/firebase-admin-dotnet

OmniSharp server started with Mono 5.18.0.
    Path: /usr/local/google/home/hkj/.vscode/extensions/ms-vscode.csharp-1.19.1/.omnisharp/1.32.19/omnisharp/OmniSharp.exe
    PID: 28462

[info]: OmniSharp.Stdio.Host
        Starting OmniSharp on debian 0.0 (x64)
[info]: OmniSharp.Services.DotNetCliService
        DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Located 1 MSBuild instance(s)
            1: StandAlone 15.0 - "/usr/local/google/home/hkj/.vscode/extensions/ms-vscode.csharp-1.19.1/.omnisharp/1.32.19/omnisharp/.msbuild/Current/Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        MSBUILD_EXE_PATH environment variable set to '/usr/local/google/home/hkj/.vscode/extensions/ms-vscode.csharp-1.19.1/.omnisharp/1.32.19/omnisharp/.msbuild/Current/Bin/MSBuild.dll'
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Registered MSBuild instance: StandAlone 15.0 - "/usr/local/google/home/hkj/.vscode/extensions/ms-vscode.csharp-1.19.1/.omnisharp/1.32.19/omnisharp/.msbuild/Current/Bin"
            MSBuildExtensionsPath = /usr/lib/mono/xbuild
            BypassFrameworkInstallChecks = true
            CscToolPath = /usr/local/google/home/hkj/.vscode/extensions/ms-vscode.csharp-1.19.1/.omnisharp/1.32.19/omnisharp/.msbuild/Current/Bin/Roslyn
            CscToolExe = csc.exe
            MSBuildToolsPath = /usr/local/google/home/hkj/.vscode/extensions/ms-vscode.csharp-1.19.1/.omnisharp/1.32.19/omnisharp/.msbuild/Current/Bin
            TargetFrameworkRootPath = /usr/lib/mono/xbuild-frameworks
[info]: OmniSharp.Cake.CakeProjectSystem
        Detecting Cake files in '/usr/local/google/home/hkj/Projects/firebase-admin-dotnet/temp/firebase-admin-dotnet'.
[info]: OmniSharp.Cake.CakeProjectSystem
        Could not find any Cake files
[info]: OmniSharp.WorkspaceInitializer
        Project system 'OmniSharp.DotNet.DotNetProjectSystem' is disabled in the configuration.
[info]: OmniSharp.MSBuild.ProjectSystem
        No solution files found in '/usr/local/google/home/hkj/Projects/firebase-admin-dotnet/temp/firebase-admin-dotnet'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/usr/local/google/home/hkj/Projects/firebase-admin-dotnet/temp/firebase-admin-dotnet/FirebaseAdmin/FirebaseAdmin/FirebaseAdmin.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/usr/local/google/home/hkj/Projects/firebase-admin-dotnet/temp/firebase-admin-dotnet/FirebaseAdmin/FirebaseAdmin.IntegrationTests/FirebaseAdmin.IntegrationTests.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/usr/local/google/home/hkj/Projects/firebase-admin-dotnet/temp/firebase-admin-dotnet/FirebaseAdmin/FirebaseAdmin.Snippets/FirebaseAdmin.Snippets.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/usr/local/google/home/hkj/Projects/firebase-admin-dotnet/temp/firebase-admin-dotnet/FirebaseAdmin/FirebaseAdmin.Tests/FirebaseAdmin.Tests.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
        Detecting CSX files in '/usr/local/google/home/hkj/Projects/firebase-admin-dotnet/temp/firebase-admin-dotnet'.
[info]: OmniSharp.Script.ScriptProjectSystem
        Could not find any CSX files
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpWorkspaceOptionsProvider
[info]: OmniSharp.WorkspaceInitializer
        Configuration finished.
[info]: OmniSharp.Stdio.Host
        Omnisharp server running using Stdio at location '/usr/local/google/home/hkj/Projects/firebase-admin-dotnet/temp/firebase-admin-dotnet' on host 28324.
[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: /usr/local/google/home/hkj/Projects/firebase-admin-dotnet/temp/firebase-admin-dotnet/FirebaseAdmin/FirebaseAdmin/FirebaseAdmin.csproj
[info]: OmniSharp.MSBuild.ProjectManager
        Successfully loaded project file '/usr/local/google/home/hkj/Projects/firebase-admin-dotnet/temp/firebase-admin-dotnet/FirebaseAdmin/FirebaseAdmin/FirebaseAdmin.csproj'.
[info]: OmniSharp.MSBuild.ProjectManager
        Adding project '/usr/local/google/home/hkj/Projects/firebase-admin-dotnet/temp/firebase-admin-dotnet/FirebaseAdmin/FirebaseAdmin/FirebaseAdmin.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: /usr/local/google/home/hkj/Projects/firebase-admin-dotnet/temp/firebase-admin-dotnet/FirebaseAdmin/FirebaseAdmin.IntegrationTests/FirebaseAdmin.IntegrationTests.csproj
[fail]: OmniSharp.MSBuild.ProjectLoader
        The "GetReferenceNearestTargetFrameworkTask" task failed unexpectedly.
System.IndexOutOfRangeException: Index was outside the bounds of the array.
  at System.Collections.Generic.LargeArrayBuilder`1[T].GetBuffer (System.Int32 index) [0x00022] in <13c0993ff82548209b09f271bd5e6a78>:0 
  at System.Collections.Generic.LargeArrayBuilder`1[T].CopyTo (System.Collections.Generic.CopyPosition position, T[] array, System.Int32 arrayIndex, System.Int32 count) [0x00041] in <13c0993ff82548209b09f271bd5e6a78>:0 
  at System.Collections.Generic.SparseArrayBuilder`1[T].CopyTo (T[] array, System.Int32 arrayIndex, System.Int32 count) [0x0009a] in <13c0993ff82548209b09f271bd5e6a78>:0 
  at System.Collections.Generic.SparseArrayBuilder`1[T].ToArray () [0x00028] in <13c0993ff82548209b09f271bd5e6a78>:0 
  at System.Linq.Enumerable+Concat2Iterator`1[TSource].ToArray () [0x00024] in <13c0993ff82548209b09f271bd5e6a78>:0 
  at System.Linq.Enumerable.ToArray[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00021] in <13c0993ff82548209b09f271bd5e6a78>:0 
  at NuGet.Frameworks.DefaultFrameworkMappings.get_CompatibilityMappings () [0x00462] in <5337e456fd6d42eb9a9378dd0c6d35e0>:0 
  at NuGet.Frameworks.FrameworkNameProvider.InitMappings (System.Collections.Generic.IEnumerable`1[T] mappings) [0x00055] in <5337e456fd6d42eb9a9378dd0c6d35e0>:0 
  at NuGet.Frameworks.FrameworkNameProvider..ctor (System.Collections.Generic.IEnumerable`1[T] mappings, System.Collections.Generic.IEnumerable`1[T] portableMappings) [0x0010e] in <5337e456fd6d42eb9a9378dd0c6d35e0>:0 
  at NuGet.Frameworks.DefaultFrameworkNameProvider..ctor () [0x0001c] in <5337e456fd6d42eb9a9378dd0c6d35e0>:0 
  at NuGet.Frameworks.DefaultFrameworkNameProvider.get_Instance () [0x00007] in <5337e456fd6d42eb9a9378dd0c6d35e0>:0 
  at NuGet.Frameworks.NuGetFramework.Parse (System.String folderName) [0x00000] in <5337e456fd6d42eb9a9378dd0c6d35e0>:0 
  at NuGet.Build.Tasks.GetReferenceNearestTargetFrameworkTask.TryParseFramework (System.String framework, System.String errorMessage, NuGet.Build.MSBuildLogger logger, NuGet.Frameworks.NuGetFramework& nugetFramework) [0x00000] in <409b2dbc2e9a42f2985ae2d466161a52>:0 
  at NuGet.Build.Tasks.GetReferenceNearestTargetFrameworkTask.Execute () [0x00108] in <409b2dbc2e9a42f2985ae2d466161a52>:0 
  at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () [0x00029] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 
  at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask (Microsoft.Build.BackEnd.ITaskExecutionHost taskExecutionHost, Microsoft.Build.BackEnd.Logging.TaskLoggingContext taskLoggingContext, Microsoft.Build.BackEnd.TaskHost taskHost, Microsoft.Build.BackEnd.ItemBucket bucket, Microsoft.Build.BackEnd.TaskExecutionMode howToExecuteTask) [0x00212] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file '/usr/local/google/home/hkj/Projects/firebase-admin-dotnet/temp/firebase-admin-dotnet/FirebaseAdmin/FirebaseAdmin.IntegrationTests/FirebaseAdmin.IntegrationTests.csproj'.
/usr/local/google/home/hkj/Projects/firebase-admin-dotnet/temp/firebase-admin-dotnet/FirebaseAdmin/FirebaseAdmin.IntegrationTests/FirebaseAdmin.IntegrationTests.csproj
/usr/local/google/home/hkj/.vscode/extensions/ms-vscode.csharp-1.19.1/.omnisharp/1.32.19/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1677,5): Error: The "GetReferenceNearestTargetFrameworkTask" task failed unexpectedly.
System.IndexOutOfRangeException: Index was outside the bounds of the array.
  at System.Collections.Generic.LargeArrayBuilder`1[T].GetBuffer (System.Int32 index) [0x00022] in <13c0993ff82548209b09f271bd5e6a78>:0 
  at System.Collections.Generic.LargeArrayBuilder`1[T].CopyTo (System.Collections.Generic.CopyPosition position, T[] array, System.Int32 arrayIndex, System.Int32 count) [0x00041] in <13c0993ff82548209b09f271bd5e6a78>:0 
  at System.Collections.Generic.SparseArrayBuilder`1[T].CopyTo (T[] array, System.Int32 arrayIndex, System.Int32 count) [0x0009a] in <13c0993ff82548209b09f271bd5e6a78>:0 
  at System.Collections.Generic.SparseArrayBuilder`1[T].ToArray () [0x00028] in <13c0993ff82548209b09f271bd5e6a78>:0 
  at System.Linq.Enumerable+Concat2Iterator`1[TSource].ToArray () [0x00024] in <13c0993ff82548209b09f271bd5e6a78>:0 
  at System.Linq.Enumerable.ToArray[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00021] in <13c0993ff82548209b09f271bd5e6a78>:0 
  at NuGet.Frameworks.DefaultFrameworkMappings.get_CompatibilityMappings () [0x00462] in <5337e456fd6d42eb9a9378dd0c6d35e0>:0 
  at NuGet.Frameworks.FrameworkNameProvider.InitMappings (System.Collections.Generic.IEnumerable`1[T] mappings) [0x00055] in <5337e456fd6d42eb9a9378dd0c6d35e0>:0 
  at NuGet.Frameworks.FrameworkNameProvider..ctor (System.Collections.Generic.IEnumerable`1[T] mappings, System.Collections.Generic.IEnumerable`1[T] portableMappings) [0x0010e] in <5337e456fd6d42eb9a9378dd0c6d35e0>:0 
  at NuGet.Frameworks.DefaultFrameworkNameProvider..ctor () [0x0001c] in <5337e456fd6d42eb9a9378dd0c6d35e0>:0 
  at NuGet.Frameworks.DefaultFrameworkNameProvider.get_Instance () [0x00007] in <5337e456fd6d42eb9a9378dd0c6d35e0>:0 
  at NuGet.Frameworks.NuGetFramework.Parse (System.String folderName) [0x00000] in <5337e456fd6d42eb9a9378dd0c6d35e0>:0 
  at NuGet.Build.Tasks.GetReferenceNearestTargetFrameworkTask.TryParseFramework (System.String framework, System.String errorMessage, NuGet.Build.MSBuildLogger logger, NuGet.Frameworks.NuGetFramework& nugetFramework) [0x00000] in <409b2dbc2e9a42f2985ae2d466161a52>:0 
  at NuGet.Build.Tasks.GetReferenceNearestTargetFrameworkTask.Execute () [0x00108] in <409b2dbc2e9a42f2985ae2d466161a52>:0 
  at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () [0x00029] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 
  at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask (Microsoft.Build.BackEnd.ITaskExecutionHost taskExecutionHost, Microsoft.Build.BackEnd.Logging.TaskLoggingContext taskLoggingContext, Microsoft.Build.BackEnd.TaskHost taskHost, Microsoft.Build.BackEnd.ItemBucket bucket, Microsoft.Build.BackEnd.TaskExecutionMode howToExecuteTask) [0x00212] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 

[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: /usr/local/google/home/hkj/Projects/firebase-admin-dotnet/temp/firebase-admin-dotnet/FirebaseAdmin/FirebaseAdmin.Snippets/FirebaseAdmin.Snippets.csproj
[fail]: OmniSharp.MSBuild.ProjectLoader
        The "GetReferenceNearestTargetFrameworkTask" task failed unexpectedly.
System.IndexOutOfRangeException: Index was outside the bounds of the array.
  at System.Collections.Generic.LargeArrayBuilder`1[T].GetBuffer (System.Int32 index) [0x00022] in <13c0993ff82548209b09f271bd5e6a78>:0 
  at System.Collections.Generic.LargeArrayBuilder`1[T].CopyTo (System.Collections.Generic.CopyPosition position, T[] array, System.Int32 arrayIndex, System.Int32 count) [0x00041] in <13c0993ff82548209b09f271bd5e6a78>:0 
  at System.Collections.Generic.SparseArrayBuilder`1[T].CopyTo (T[] array, System.Int32 arrayIndex, System.Int32 count) [0x0009a] in <13c0993ff82548209b09f271bd5e6a78>:0 
  at System.Collections.Generic.SparseArrayBuilder`1[T].ToArray () [0x00028] in <13c0993ff82548209b09f271bd5e6a78>:0 
  at System.Linq.Enumerable+Concat2Iterator`1[TSource].ToArray () [0x00024] in <13c0993ff82548209b09f271bd5e6a78>:0 
  at System.Linq.Enumerable.ToArray[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00021] in <13c0993ff82548209b09f271bd5e6a78>:0 
  at NuGet.Frameworks.DefaultFrameworkMappings.get_CompatibilityMappings () [0x00462] in <5337e456fd6d42eb9a9378dd0c6d35e0>:0 
  at NuGet.Frameworks.FrameworkNameProvider.InitMappings (System.Collections.Generic.IEnumerable`1[T] mappings) [0x00055] in <5337e456fd6d42eb9a9378dd0c6d35e0>:0 
  at NuGet.Frameworks.FrameworkNameProvider..ctor (System.Collections.Generic.IEnumerable`1[T] mappings, System.Collections.Generic.IEnumerable`1[T] portableMappings) [0x0010e] in <5337e456fd6d42eb9a9378dd0c6d35e0>:0 
  at NuGet.Frameworks.DefaultFrameworkNameProvider..ctor () [0x0001c] in <5337e456fd6d42eb9a9378dd0c6d35e0>:0 
  at NuGet.Frameworks.DefaultFrameworkNameProvider.get_Instance () [0x00007] in <5337e456fd6d42eb9a9378dd0c6d35e0>:0 
  at NuGet.Frameworks.NuGetFramework.Parse (System.String folderName) [0x00000] in <5337e456fd6d42eb9a9378dd0c6d35e0>:0 
  at NuGet.Build.Tasks.GetReferenceNearestTargetFrameworkTask.TryParseFramework (System.String framework, System.String errorMessage, NuGet.Build.MSBuildLogger logger, NuGet.Frameworks.NuGetFramework& nugetFramework) [0x00000] in <409b2dbc2e9a42f2985ae2d466161a52>:0 
  at NuGet.Build.Tasks.GetReferenceNearestTargetFrameworkTask.Execute () [0x00108] in <409b2dbc2e9a42f2985ae2d466161a52>:0 
  at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () [0x00029] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 
  at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask (Microsoft.Build.BackEnd.ITaskExecutionHost taskExecutionHost, Microsoft.Build.BackEnd.Logging.TaskLoggingContext taskLoggingContext, Microsoft.Build.BackEnd.TaskHost taskHost, Microsoft.Build.BackEnd.ItemBucket bucket, Microsoft.Build.BackEnd.TaskExecutionMode howToExecuteTask) [0x00212] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file '/usr/local/google/home/hkj/Projects/firebase-admin-dotnet/temp/firebase-admin-dotnet/FirebaseAdmin/FirebaseAdmin.Snippets/FirebaseAdmin.Snippets.csproj'.
/usr/local/google/home/hkj/Projects/firebase-admin-dotnet/temp/firebase-admin-dotnet/FirebaseAdmin/FirebaseAdmin.Snippets/FirebaseAdmin.Snippets.csproj
/usr/local/google/home/hkj/.vscode/extensions/ms-vscode.csharp-1.19.1/.omnisharp/1.32.19/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1677,5): Error: The "GetReferenceNearestTargetFrameworkTask" task failed unexpectedly.
System.IndexOutOfRangeException: Index was outside the bounds of the array.
  at System.Collections.Generic.LargeArrayBuilder`1[T].GetBuffer (System.Int32 index) [0x00022] in <13c0993ff82548209b09f271bd5e6a78>:0 
  at System.Collections.Generic.LargeArrayBuilder`1[T].CopyTo (System.Collections.Generic.CopyPosition position, T[] array, System.Int32 arrayIndex, System.Int32 count) [0x00041] in <13c0993ff82548209b09f271bd5e6a78>:0 
  at System.Collections.Generic.SparseArrayBuilder`1[T].CopyTo (T[] array, System.Int32 arrayIndex, System.Int32 count) [0x0009a] in <13c0993ff82548209b09f271bd5e6a78>:0 
  at System.Collections.Generic.SparseArrayBuilder`1[T].ToArray () [0x00028] in <13c0993ff82548209b09f271bd5e6a78>:0 
  at System.Linq.Enumerable+Concat2Iterator`1[TSource].ToArray () [0x00024] in <13c0993ff82548209b09f271bd5e6a78>:0 
  at System.Linq.Enumerable.ToArray[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00021] in <13c0993ff82548209b09f271bd5e6a78>:0 
  at NuGet.Frameworks.DefaultFrameworkMappings.get_CompatibilityMappings () [0x00462] in <5337e456fd6d42eb9a9378dd0c6d35e0>:0 
  at NuGet.Frameworks.FrameworkNameProvider.InitMappings (System.Collections.Generic.IEnumerable`1[T] mappings) [0x00055] in <5337e456fd6d42eb9a9378dd0c6d35e0>:0 
  at NuGet.Frameworks.FrameworkNameProvider..ctor (System.Collections.Generic.IEnumerable`1[T] mappings, System.Collections.Generic.IEnumerable`1[T] portableMappings) [0x0010e] in <5337e456fd6d42eb9a9378dd0c6d35e0>:0 
  at NuGet.Frameworks.DefaultFrameworkNameProvider..ctor () [0x0001c] in <5337e456fd6d42eb9a9378dd0c6d35e0>:0 
  at NuGet.Frameworks.DefaultFrameworkNameProvider.get_Instance () [0x00007] in <5337e456fd6d42eb9a9378dd0c6d35e0>:0 
  at NuGet.Frameworks.NuGetFramework.Parse (System.String folderName) [0x00000] in <5337e456fd6d42eb9a9378dd0c6d35e0>:0 
  at NuGet.Build.Tasks.GetReferenceNearestTargetFrameworkTask.TryParseFramework (System.String framework, System.String errorMessage, NuGet.Build.MSBuildLogger logger, NuGet.Frameworks.NuGetFramework& nugetFramework) [0x00000] in <409b2dbc2e9a42f2985ae2d466161a52>:0 
  at NuGet.Build.Tasks.GetReferenceNearestTargetFrameworkTask.Execute () [0x00108] in <409b2dbc2e9a42f2985ae2d466161a52>:0 
  at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () [0x00029] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 
  at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask (Microsoft.Build.BackEnd.ITaskExecutionHost taskExecutionHost, Microsoft.Build.BackEnd.Logging.TaskLoggingContext taskLoggingContext, Microsoft.Build.BackEnd.TaskHost taskHost, Microsoft.Build.BackEnd.ItemBucket bucket, Microsoft.Build.BackEnd.TaskExecutionMode howToExecuteTask) [0x00212] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 

[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: /usr/local/google/home/hkj/Projects/firebase-admin-dotnet/temp/firebase-admin-dotnet/FirebaseAdmin/FirebaseAdmin.Tests/FirebaseAdmin.Tests.csproj
[fail]: OmniSharp.MSBuild.ProjectLoader
        The "GetReferenceNearestTargetFrameworkTask" task failed unexpectedly.
System.IndexOutOfRangeException: Index was outside the bounds of the array.
  at System.Collections.Generic.LargeArrayBuilder`1[T].GetBuffer (System.Int32 index) [0x00022] in <13c0993ff82548209b09f271bd5e6a78>:0 
  at System.Collections.Generic.LargeArrayBuilder`1[T].CopyTo (System.Collections.Generic.CopyPosition position, T[] array, System.Int32 arrayIndex, System.Int32 count) [0x00041] in <13c0993ff82548209b09f271bd5e6a78>:0 
  at System.Collections.Generic.SparseArrayBuilder`1[T].CopyTo (T[] array, System.Int32 arrayIndex, System.Int32 count) [0x0009a] in <13c0993ff82548209b09f271bd5e6a78>:0 
  at System.Collections.Generic.SparseArrayBuilder`1[T].ToArray () [0x00028] in <13c0993ff82548209b09f271bd5e6a78>:0 
  at System.Linq.Enumerable+Concat2Iterator`1[TSource].ToArray () [0x00024] in <13c0993ff82548209b09f271bd5e6a78>:0 
  at System.Linq.Enumerable.ToArray[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00021] in <13c0993ff82548209b09f271bd5e6a78>:0 
  at NuGet.Frameworks.DefaultFrameworkMappings.get_CompatibilityMappings () [0x00462] in <5337e456fd6d42eb9a9378dd0c6d35e0>:0 
  at NuGet.Frameworks.FrameworkNameProvider.InitMappings (System.Collections.Generic.IEnumerable`1[T] mappings) [0x00055] in <5337e456fd6d42eb9a9378dd0c6d35e0>:0 
  at NuGet.Frameworks.FrameworkNameProvider..ctor (System.Collections.Generic.IEnumerable`1[T] mappings, System.Collections.Generic.IEnumerable`1[T] portableMappings) [0x0010e] in <5337e456fd6d42eb9a9378dd0c6d35e0>:0 
  at NuGet.Frameworks.DefaultFrameworkNameProvider..ctor () [0x0001c] in <5337e456fd6d42eb9a9378dd0c6d35e0>:0 
  at NuGet.Frameworks.DefaultFrameworkNameProvider.get_Instance () [0x00007] in <5337e456fd6d42eb9a9378dd0c6d35e0>:0 
  at NuGet.Frameworks.NuGetFramework.Parse (System.String folderName) [0x00000] in <5337e456fd6d42eb9a9378dd0c6d35e0>:0 
  at NuGet.Build.Tasks.GetReferenceNearestTargetFrameworkTask.TryParseFramework (System.String framework, System.String errorMessage, NuGet.Build.MSBuildLogger logger, NuGet.Frameworks.NuGetFramework& nugetFramework) [0x00000] in <409b2dbc2e9a42f2985ae2d466161a52>:0 
  at NuGet.Build.Tasks.GetReferenceNearestTargetFrameworkTask.Execute () [0x00108] in <409b2dbc2e9a42f2985ae2d466161a52>:0 
  at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () [0x00029] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 
  at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask (Microsoft.Build.BackEnd.ITaskExecutionHost taskExecutionHost, Microsoft.Build.BackEnd.Logging.TaskLoggingContext taskLoggingContext, Microsoft.Build.BackEnd.TaskHost taskHost, Microsoft.Build.BackEnd.ItemBucket bucket, Microsoft.Build.BackEnd.TaskExecutionMode howToExecuteTask) [0x00212] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file '/usr/local/google/home/hkj/Projects/firebase-admin-dotnet/temp/firebase-admin-dotnet/FirebaseAdmin/FirebaseAdmin.Tests/FirebaseAdmin.Tests.csproj'.
/usr/local/google/home/hkj/Projects/firebase-admin-dotnet/temp/firebase-admin-dotnet/FirebaseAdmin/FirebaseAdmin.Tests/FirebaseAdmin.Tests.csproj
/usr/local/google/home/hkj/.vscode/extensions/ms-vscode.csharp-1.19.1/.omnisharp/1.32.19/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1677,5): Error: The "GetReferenceNearestTargetFrameworkTask" task failed unexpectedly.
System.IndexOutOfRangeException: Index was outside the bounds of the array.
  at System.Collections.Generic.LargeArrayBuilder`1[T].GetBuffer (System.Int32 index) [0x00022] in <13c0993ff82548209b09f271bd5e6a78>:0 
  at System.Collections.Generic.LargeArrayBuilder`1[T].CopyTo (System.Collections.Generic.CopyPosition position, T[] array, System.Int32 arrayIndex, System.Int32 count) [0x00041] in <13c0993ff82548209b09f271bd5e6a78>:0 
  at System.Collections.Generic.SparseArrayBuilder`1[T].CopyTo (T[] array, System.Int32 arrayIndex, System.Int32 count) [0x0009a] in <13c0993ff82548209b09f271bd5e6a78>:0 
  at System.Collections.Generic.SparseArrayBuilder`1[T].ToArray () [0x00028] in <13c0993ff82548209b09f271bd5e6a78>:0 
  at System.Linq.Enumerable+Concat2Iterator`1[TSource].ToArray () [0x00024] in <13c0993ff82548209b09f271bd5e6a78>:0 
  at System.Linq.Enumerable.ToArray[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00021] in <13c0993ff82548209b09f271bd5e6a78>:0 
  at NuGet.Frameworks.DefaultFrameworkMappings.get_CompatibilityMappings () [0x00462] in <5337e456fd6d42eb9a9378dd0c6d35e0>:0 
  at NuGet.Frameworks.FrameworkNameProvider.InitMappings (System.Collections.Generic.IEnumerable`1[T] mappings) [0x00055] in <5337e456fd6d42eb9a9378dd0c6d35e0>:0 
  at NuGet.Frameworks.FrameworkNameProvider..ctor (System.Collections.Generic.IEnumerable`1[T] mappings, System.Collections.Generic.IEnumerable`1[T] portableMappings) [0x0010e] in <5337e456fd6d42eb9a9378dd0c6d35e0>:0 
  at NuGet.Frameworks.DefaultFrameworkNameProvider..ctor () [0x0001c] in <5337e456fd6d42eb9a9378dd0c6d35e0>:0 
  at NuGet.Frameworks.DefaultFrameworkNameProvider.get_Instance () [0x00007] in <5337e456fd6d42eb9a9378dd0c6d35e0>:0 
  at NuGet.Frameworks.NuGetFramework.Parse (System.String folderName) [0x00000] in <5337e456fd6d42eb9a9378dd0c6d35e0>:0 
  at NuGet.Build.Tasks.GetReferenceNearestTargetFrameworkTask.TryParseFramework (System.String framework, System.String errorMessage, NuGet.Build.MSBuildLogger logger, NuGet.Frameworks.NuGetFramework& nugetFramework) [0x00000] in <409b2dbc2e9a42f2985ae2d466161a52>:0 
  at NuGet.Build.Tasks.GetReferenceNearestTargetFrameworkTask.Execute () [0x00108] in <409b2dbc2e9a42f2985ae2d466161a52>:0 
  at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () [0x00029] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 
  at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask (Microsoft.Build.BackEnd.ITaskExecutionHost taskExecutionHost, Microsoft.Build.BackEnd.Logging.TaskLoggingContext taskLoggingContext, Microsoft.Build.BackEnd.TaskHost taskHost, Microsoft.Build.BackEnd.ItemBucket bucket, Microsoft.Build.BackEnd.TaskExecutionMode howToExecuteTask) [0x00212] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 

[info]: OmniSharp.MSBuild.ProjectManager
        Update project: FirebaseAdmin
[fail]: OmniSharp.MSBuild.ProjectManager
        Attempted to update project that is not loaded: /usr/local/google/home/hkj/Projects/firebase-admin-dotnet/temp/firebase-admin-dotnet/FirebaseAdmin/FirebaseAdmin.IntegrationTests/FirebaseAdmin.IntegrationTests.csproj
[fail]: OmniSharp.MSBuild.ProjectManager
        Attempted to update project that is not loaded: /usr/local/google/home/hkj/Projects/firebase-admin-dotnet/temp/firebase-admin-dotnet/FirebaseAdmin/FirebaseAdmin.Snippets/FirebaseAdmin.Snippets.csproj
[fail]: OmniSharp.MSBuild.ProjectManager
        Attempted to update project that is not loaded: /usr/local/google/home/hkj/Projects/firebase-admin-dotnet/temp/firebase-admin-dotnet/FirebaseAdmin/FirebaseAdmin.Tests/FirebaseAdmin.Tests.csproj

C# log

Nothing logged. Empty.

Environment information

VSCode version: 1.33.1 C# Extension: 1.19.1

Mono Information OmniSharp using global mono :5.18.0
Dotnet Information .NET Command Line Tools (2.1.102)

Product Information: Version: 2.1.102 Commit SHA-1 hash: 8d409357db

Runtime Environment: OS Name: debian OS Version:
OS Platform: Linux RID: debian-x64 Base Path: /usr/local/google/home/hkj/Software/dotnetsdk-2.1.102/sdk/2.1.102/

Microsoft .NET Core Shared Framework Host

Version : 2.0.6 Build : 74b1c703813c8910df5b96f304b0f2b78cdf194d

Visual Studio Code Extensions
Extension Author Version
csharp ms-vscode 1.19.1
Go ms-vscode 0.10.2
java redhat 0.44.0
java-generate-setters-getters sohibe 4.2.1
python ms-python 2019.4.12954
vscode-java-debug vscjava 0.18.0
vscode-java-dependency vscjava 0.4.0
vscode-java-pack vscjava 0.7.1
vscode-java-test vscjava 0.16.0
vscode-maven vscjava 0.16.2
vscode-typescript-tslint-plugin ms-vscode 1.0.0
vscodeintellicode VisualStudioExptTeam 1.1.6

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 2
  • Comments: 17 (3 by maintainers)

Most upvoted comments

@hiranya911 Could you try setting “omnisharp.useGlobalMono”: never. This will run omnisharp on the mono that is packed in the omnisharp bits that we ship.

@JorgeDLG I don’t understand your problem, but I’m glad you found a way to fix it. In my case I added the mono repository and then installed the latest mono-devel via apt update.

I fixed my problem - maybe it’ll help you. I added the official mono repository, and updated to the latest mono-devel from there.