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.

C# Extension Stopped Working on Linux

See original GitHub issue

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

Issue Analytics

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

github_iconTop GitHub Comments

3reactions
akshita31commented, May 29, 2019

@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.

3reactions
lonix1commented, May 14, 2019

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# extension not working in VSCode in Linux - Stack Overflow
I am a Kubuntu user. I downloaded VSCode to program in Unity and added the C# Extension for autocompletion as an IDE.
Read more >
C/C++ extension FAQ - Visual Studio Code
Frequently asked questions. Why are my files corrupted on format? How do I get IntelliSense to work correctly? Why do I see red...
Read more >
Linux and VS-Code not working on Unity C# scripts
I tried in Unity Editor clicking "Assets -> Open C# Project" but it did not help.
Read more >
Visual Studio Code - ArchWiki
Code - OSS — Official Arch Linux open-source release. ... Remove the line to solve the problem or use an external terminal.
Read more >
Find and install extensions - Visual Studio (Windows)
vsixmanifest file, the extension appears in the Manage Extensions dialog box. Uninstall or disable an extension. If you want to stop using an ......
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