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

Created on 15 Feb 2020  路  10Comments  路  Source: OmniSharp/omnisharp-vscode

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|;

Bug Triaged

Most helpful comment

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 ) 

All 10 comments

@ahmelsayed Sorry you are having troubles. I followed your instructions, also added a dotnet restore WebJobs.Scripts.sln before opening VS Code, and didn't have any trouble. Have you tried disabling other extensions to ensure we are the ones throwing an error?

I did dotnet restore, and disabled all extensions but the WSL extension and C#.

I still see the your 131072x1 screen size is bogus. expect trouble error when trying to switch from WebJobs.Script.Tests.E2E.sln to WebJobs.Script.sln and this error in Log (Window) which I don't know if it's related.

[2020-02-18 14:55:30.179] [renderer1] [error] net::ERR_CONNECTION_RESET: Error: net::ERR_CONNECTION_RESET
[2020-02-18 14:59:43.036] [renderer1] [error] An unknown error occurred. Please consult the log for more details.

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.2
Commit: 916b5cba26

.NET Core SDKs installed:
2.1.804 [/usr/share/dotnet/sdk]
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.1.16 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.8 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.16 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
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.1.16 [/usr/share/dotnet/shared/Microsoft.NETCore.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.2 [/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|
|---|---|---|
|csharp|ms-vscode|1.21.11|;

Untitled Project

@ahmelsayed I found this related issue in the VSCode repo - https://github.com/Microsoft/vscode/issues/35798

The error is not ours and from the brief look at the OmniSharp log in your gif, it seems that things are loading properly.

The WSL situation makes it look like this open VS Code issue - https://github.com/microsoft/vscode/issues/75932

Sorry for not getting back to you earlier. The project loads fine when using vscode on Windows, only when accessing it from WSL like in the gif. I'll keep an eye on the issue, though I still don't really understand why it accepts the sln file if it's renamed, but not with its original name.

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 ) 

@victoralvesp Sorry you are running into this, but thank you for reporting. I'll reopen and take a look at what we might have missed.

I found a workaround: if you rename the project/solution so it is the first in OmniSharp: Select Project command list and restart omnisharp, it'll start with the correct selected project/solution

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

Was this page helpful?
0 / 5 - 0 ratings