Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vscode extension xaml code completion doesn't work on linux #7639

Closed
trampster opened this issue Dec 13, 2021 · 12 comments
Closed

vscode extension xaml code completion doesn't work on linux #7639

trampster opened this issue Dec 13, 2021 · 12 comments
Labels
difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification

Comments

@trampster
Copy link

Current behavior

When editing a xaml page there is no code completion

In the Uno Platform -XAML output windows it says this:

warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available

I'm on Ubuntu 20.04, I have .net 6 installed and the Uno Platform vscode extension installed.

uno-check does not report any problems.

Expected behavior

I expect to get code completion when editing my xaml files. I expect this because the Uno Platform vscode extension details says the following:

  • Code-behind navigation from a XAML file

How to reproduce it (as minimally and precisely as possible)

  1. Created a new uno project by exactly following the instructions here: https://platform.uno/docs/articles/get-started-vscode.html
  2. Try and edit a xaml file
    -> no code completion

Workaround

No response

Works on UWP/WinUI

No response

Environment

No response

NuGet package version(s)

No response

Affected platforms

Skia (GTK on Linux/macOS/Windows)

IDE

Visual Studio Code

IDE version

1.63.0

Relevant plugins

No response

Anything else we need to know?

No response

@trampster trampster added difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification labels Dec 13, 2021
@trampster trampster changed the title vscode extension xaml code completion doesn't work vscode extension xaml code completion doesn't work on linux Dec 13, 2021
@jeromelaban
Copy link
Member

Thanks for the report. Can you provide the output of the "Uno Platform" output as well ?

@jeromelaban jeromelaban added the triage/needs-information Indicates an issue needs more information in order to work on it. label Dec 13, 2021
@trampster
Copy link
Author

Uno Platform output:

Uno Platform "dotnet new" templates are already installed. The templates may be updated by running "dotnet new -i Uno.ProjectTemplates.Dotnet"
Multiple projects loaded, select one in OmniSharp
Multiple projects loaded, select one in OmniSharp

@no-response no-response bot removed the triage/needs-information Indicates an issue needs more information in order to work on it. label Dec 13, 2021
@trampster
Copy link
Author

trampster commented Dec 13, 2021

I reloaded my vscode and the "Multiple projects loaded..." logs went away, but still no code completion. here is the full Uno Platform - XAML logs

info: Microsoft.Hosting.Lifetime[0]
      Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
      Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
      Content root path: /home/daniel/Work/UnoDemo/MyApp
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available
warn: Uno.LanguageServer.Workspace[0]
      No Roslyn worker is available

@jeromelaban
Copy link
Member

jeromelaban commented Dec 13, 2021

Thanks. Make sure to select a specific project in the project selector: https://platform.uno/docs/articles/get-started-vscode.html#prepare-the-webassembly-application

We're going to be releasing an update that makes step more obvious.

@trampster
Copy link
Author

trampster commented Dec 13, 2021

I couldn't do that, there isn't anything in the status bar to select. I did delete the webassembly project so that there was no other main project option just MyApp.Skia.Gtk and MyApp.Shared. I believe this is what made the "Multiple projects loaded, select one in OmniSharp" log message go away

image

@jeromelaban
Copy link
Member

Thanks. This likely means that the project fails to load in omnisharp. Can you take a look at the omnisharp log as well ?

@trampster
Copy link
Author

trampster commented Dec 13, 2021

So there was an exception there because MyApp-vsmac.slnf still referenced the missing Web Assembly project, I removed that now I get "MyApp-vsmac.slnf" selected but clicking it results in an error

Extension 'ms-dotnettools.csharp' CANNOT use API proposal: quickPickSeparators.
Its package.json#enabledApiProposals-property declares: [] but NOT quickPickSeparators.
 The missing proposal MUST be added and you must start in extension development mode or use the following command line switch: --enable-proposed-api ms-dotnettools.csharp

Why is there even a vsmac file here, is it confusing vscode?

@trampster
Copy link
Author

If I remove the vsmac file then it selects MyApp.sln, If I click that I get the same error.

@trampster
Copy link
Author

I seem to be running into this error dotnet/vscode-csharp#4907

Some comments say fixing sln/csproj files can make it go away, others say even fresh templates from dotnet new cause this to happen.

@jeromelaban
Copy link
Member

Thanks, this looks like a recent issue in omnisharp: dotnet/vscode-csharp#4937.

You can try downgrading omnisharp to an earlier release, or upgrade to the preview.

@trampster
Copy link
Author

I can confirm that upgrading to the OmniSharp beta fixes the problem

@jeromelaban
Copy link
Member

Thanks for the update!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification
Projects
None yet
Development

No branches or pull requests

2 participants