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.

Why can't omnisharp/vscode load this sln file?

See original GitHub issue

Issue Description

Trying to use vscode (with WSL remote development extention) with this project https://github.com/Azure/azure-functions-host doesn’t work

Steps to Reproduce

git clone https://github.com/Azure/azure-functions-host
cd azure-functions-host
code .

Expected Behavior

To be able to select between WebJobs.Script.Tests.E2E.sln and WebJobs.Script.sln

Actual Behavior

Only WebJobs.Script.Tests.E2E.sln works. Changing to WebJobs.Script.sln throws this error

your 131072x1 screen size is bogus. expect trouble

and nothing happens.

Deleting WebJobs.Script.Tests.E2E.sln and restarting vscode, causes it to not even recognize the project as C#. Copying all the content from WebJobs.Script.sln to WebJobs.Script.Tests.E2E.sln makes it work fine.

Logs

I don’t see any logs that seem to relate to the issue other than the screen size error mentioned above

I see this in Log (Window) output

[2020-02-14 15:15:11.947] [renderer1] [error] TreeError [CustomView] Tree element not found: [object Object]: Error: TreeError [CustomView] Tree element not found: [object Object]
    at t.ObjectTreeModel.getElementLocation (file:///C:/Users/ahmel/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:135:14)
    at t.ObjectTreeModel.expandTo (file:///C:/Users/ahmel/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:134:295)
    at reveal (file:///C:/Users/ahmel/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1071:612)
    at q.reveal (file:///C:/Users/ahmel/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1088:349)
    at U.reveal (file:///C:/Users/ahmel/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:5049:44)
    at p.reveal (file:///C:/Users/ahmel/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:3583:570)
    at file:///C:/Users/ahmel/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:3582:706
    at processTicksAndRejections (internal/process/task_queues.js:89:5)

OmniSharp log

Starting OmniSharp server at 2/14/2020, 3:24:36 PM
    Target: /home/ahmed/repos/azure-functions-host/WebJobs.Script.Tests.E2E.sln

OmniSharp server started with Mono 6.8.0.
    Path: /home/ahmed/.vscode-server/extensions/ms-vscode.csharp-1.21.11/.omnisharp/1.34.11/omnisharp/OmniSharp.exe
    PID: 8469

[info]: OmniSharp.Stdio.Host
        Starting OmniSharp on ubuntu 18.4 (x64)
[info]: OmniSharp.Services.DotNetCliService
        DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Located 2 MSBuild instance(s)
            1: Mono 16.3 - "/usr/lib/mono/msbuild/Current/bin"
            2: StandAlone 16.3 - "/home/ahmed/.vscode-server/extensions/ms-vscode.csharp-1.21.11/.omnisharp/1.34.11/omnisharp/.msbuild/Current/Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Registered MSBuild instance: Mono 16.3 - "/usr/lib/mono/msbuild/Current/bin"
            CscToolExe = csc.exe
            CscToolPath = /home/ahmed/.vscode-server/extensions/ms-vscode.csharp-1.21.11/.omnisharp/1.34.11/omnisharp/.msbuild/Current/Bin/Roslyn
[info]: OmniSharp.Cake.CakeProjectSystem
        Detecting Cake files in '/home/ahmed/repos/azure-functions-host'.
[info]: OmniSharp.Cake.CakeProjectSystem
        Could not find any Cake files
[info]: OmniSharp.MSBuild.ProjectSystem
        Detecting projects in '/home/ahmed/repos/azure-functions-host/WebJobs.Script.Tests.E2E.sln'.
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/home/ahmed/repos/azure-functions-host/test/WebJobs.Script.Tests.E2E/WebJobs.Script.Tests.E2E.csproj'
[info]: OmniSharp.WorkspaceInitializer
        Project system 'OmniSharp.Script.ScriptProjectSystem' is disabled in the configuration.
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: /home/ahmed/repos/azure-functions-host/test/WebJobs.Script.Tests.E2E/WebJobs.Script.Tests.E2E.csproj
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.ImplementTypeWorkspaceOptionsProvider, Order: 110
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.EditorConfigWorkspaceOptionsProvider, Order: 200
[info]: OmniSharp.WorkspaceInitializer
        Configuration finished.
[info]: OmniSharp.Stdio.Host
        Omnisharp server running using Stdio at location '/home/ahmed/repos/azure-functions-host' on host 8232.
[info]: OmniSharp.MSBuild.ProjectManager
        Successfully loaded project file '/home/ahmed/repos/azure-functions-host/test/WebJobs.Script.Tests.E2E/WebJobs.Script.Tests.E2E.csproj'.
[info]: OmniSharp.MSBuild.ProjectManager
        Adding project '/home/ahmed/repos/azure-functions-host/test/WebJobs.Script.Tests.E2E/WebJobs.Script.Tests.E2E.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Update project: WebJobs.Script.Tests.E2E

C# log

no output

Environment information

VSCode version: 1.42.1 C# Extension: 1.21.11

Mono Information OmniSharp using global mono :6.8.0
Dotnet Information .NET Core SDK (reflecting any global.json): Version: 3.1.101 Commit: b377529961

Runtime Environment: OS Name: ubuntu OS Version: 18.04 OS Platform: Linux RID: ubuntu.18.04-x64 Base Path: /usr/share/dotnet/sdk/3.1.101/

Host (useful for support): Version: 3.1.1 Commit: a1388f194c

.NET Core SDKs installed: 2.2.402 [/usr/share/dotnet/sdk] 3.0.102 [/usr/share/dotnet/sdk] 3.1.101 [/usr/share/dotnet/sdk]

.NET Core runtimes installed: Microsoft.AspNetCore.All 2.2.8 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.2.8 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.0.2 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.1 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.2.8 [/usr/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 3.0.2 [/usr/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.1 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

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

Visual Studio Code Extensions
Extension Author Version
azure-account ms-vscode 0.8.8
better-toml bungcip 0.3.2
code-spell-checker streetsidesoftware 1.7.22
csharp ms-vscode 1.21.11
gitlens eamodio 10.2.1
Go ms-vscode 0.13.0
gotestexplorer premparihar 0.1.11
java redhat 0.55.1
kotlin fwcd 0.2.11
prettier-vscode esbenp 3.20.0
python ms-python 2020.2.63072
rest-client humao 0.23.1
rust rust-lang 0.7.0
support nuke 0.2.1
vscode-azurefunctions ms-azuretools 0.20.2
vscode-docker ms-azuretools 0.10.0
vscode-java-debug vscjava 0.24.0
vscode-java-dependency vscjava 0.8.0
vscode-java-pack vscjava 0.8.1
vscode-java-test vscjava 0.22.1
vscode-maven vscjava 0.21.0
vscode-proto3 zxh404 0.4.2
vscode-swift-development-environment vknabel 2.8.3
vscode-typescript-tslint-plugin ms-vscode 1.2.3
vscodeintellicode VisualStudioExptTeam 1.2.5

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
victoralvespcommented, Jun 8, 2020

I think I’m getting the same error in version 1.22.0.

When trying to select a project or solution in a Remote WSL accessing a WSL 2 distro I get:

Command 'OmniSharp: Select Project' resulted in an error (your 131072x1 screen size is bogus. expect trouble ) 
0reactions
jplanecommented, Jun 12, 2020

Hi… getting the same issue on 1.22.0 with Remote-WSL as @victoralvesp

Read more comments on GitHub >

github_iconTop Results From Across the Web

Omnisharp not loading properly - Visual Studio Code and Unity
This project targets .NET version that requires reference assemblies that are not installed (e.g. .NET Framework). The most common solution ...
Read more >
Cannot get code completion to work in Visual Studio Code ...
Omnisharp server running using Stdio at location 'l:\repositories\newtestproject\newtestproject' on host 7824. [warn]: OmniSharp.MSBuild.
Read more >
vscode-solution-explorer - Visual Studio Marketplace
Omnisharp integration​​ csproj files because vscode-solution-explorer cannot open a project file without a Solution. You have to install ...
Read more >
How to use Visual Studio Code for almost everything .NET ...
You need the C# (Omnisharp) extension for this, of course. ** Start Visual Studio Code.** We begin with the very basics. Navigate to...
Read more >
Fixing issues with building C# solutions in .NET Core using ...
Apparently, older versions of OmniSharp can't properly deal with newer versions of .NET Core. With this setting, on each start, VSCode will ...
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