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

Unity 2020.3.25 projects fails to find project files #12

Open
genericptr opened this issue Feb 17, 2022 · 5 comments
Open

Unity 2020.3.25 projects fails to find project files #12

genericptr opened this issue Feb 17, 2022 · 5 comments

Comments

@genericptr
Copy link
Collaborator

When I upgraded Unity my project files ceased to load in LSP-Omnisharp.

In VSCode the project still loads properly and this is probably due to the dated version of Omnisharp server being used. Suggestion is to upgrade to 1.38.0 like VSCode uses.

Starting OmniSharp server at 2/17/2022, 9:27:45 AM
    Target: /Users/Shared/Unity_Roger/Thera_Practice/Thera_Practice.sln

OmniSharp server started with Mono 6.12.0.
    Path: /Users/ryanjoseph/.vscode/extensions/ms-dotnettools.csharp-1.24.0/.omnisharp/1.38.0/omnisharp/OmniSharp.exe
    PID: 42289

tomdittrich added a commit to tomdittrich/LSP-OmniSharp that referenced this issue Feb 24, 2022
rwols pushed a commit that referenced this issue Feb 27, 2022
@rwols
Copy link
Member

rwols commented Feb 27, 2022

I think this is because we use the bundled mono while we should point omnisharp to use the mono from Unity.

@genericptr
Copy link
Collaborator Author

Here's the full output from VSCode. It looks like it may be using mono 6.12.0 from a system framework outside of VSCode. What version is ST using?

Starting OmniSharp server at 2/28/2022, 1:50:55 PM
    Target: /Users/Shared/Unity_Roger/Thera_Practice/Thera_Practice.sln

OmniSharp server started with Mono 6.12.0.
    Path: /Users/ryanjoseph/.vscode/extensions/ms-dotnettools.csharp-1.24.0/.omnisharp/1.38.0/omnisharp/OmniSharp.exe
    PID: 35246

[info]: OmniSharp.Stdio.Host
        Starting OmniSharp on MacOS 12.2 (x64)
[info]: OmniSharp.Services.DotNetCliService
        Checking the 'DOTNET_ROOT' environment variable to find a .NET SDK
[info]: OmniSharp.Services.DotNetCliService
        Using the 'dotnet' on the PATH.
[info]: OmniSharp.Services.DotNetCliService
        DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Located 2 MSBuild instance(s)
            1: Mono 16.6.0 - "/Library/Frameworks/Mono.framework/Versions/6.12.0/lib/mono/msbuild/Current/bin"
            2: StandAlone 17.0.0 - "/Users/ryanjoseph/.vscode/extensions/ms-dotnettools.csharp-1.24.0/.omnisharp/1.38.0/omnisharp/.msbuild/Current/Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Registered MSBuild instance: Mono 16.6.0 - "/Library/Frameworks/Mono.framework/Versions/6.12.0/lib/mono/msbuild/Current/bin"
            CscToolExe = csc.exe
            CscToolPath = /Users/ryanjoseph/.vscode/extensions/ms-dotnettools.csharp-1.24.0/.omnisharp/1.38.0/omnisharp/.msbuild/Current/Bin/Roslyn
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.Completion.CompletionOptionsProvider, Order: 0
[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.BlockStructureWorkspaceOptionsProvider, Order: 140
[info]: OmniSharp.Cake.CakeProjectSystem
        Detecting Cake files in '/Users/Shared/Unity_Roger/Thera_Practice'.
[info]: OmniSharp.Cake.CakeProjectSystem
        Did not find any Cake files
[info]: OmniSharp.MSBuild.ProjectSystem
        Detecting projects in '/Users/Shared/Unity_Roger/Thera_Practice/Thera_Practice.sln'.
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/Shared/Unity_Roger/Thera_Practice/Assembly-CSharp.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/Shared/Unity_Roger/Thera_Practice/Assembly-CSharp-Editor.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
        Detecting CSX files in '/Users/Shared/Unity_Roger/Thera_Practice'.
[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: /Users/Shared/Unity_Roger/Thera_Practice/Assembly-CSharp.csproj
[info]: OmniSharp.Script.ScriptProjectSystem
        Did not find any CSX files
[info]: OmniSharp.WorkspaceInitializer
        Configuration finished.
[info]: OmniSharp.Stdio.Host
        Omnisharp server running using Stdio at location '/Users/Shared/Unity_Roger/Thera_Practice' on host 35203.
[info]: OmniSharp.MSBuild.ProjectManager
        Successfully loaded project file '/Users/Shared/Unity_Roger/Thera_Practice/Assembly-CSharp.csproj'.
[info]: OmniSharp.MSBuild.ProjectManager
        Adding project '/Users/Shared/Unity_Roger/Thera_Practice/Assembly-CSharp.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: /Users/Shared/Unity_Roger/Thera_Practice/Assembly-CSharp-Editor.csproj
[info]: OmniSharp.MSBuild.ProjectManager
        Successfully loaded project file '/Users/Shared/Unity_Roger/Thera_Practice/Assembly-CSharp-Editor.csproj'.
[info]: OmniSharp.MSBuild.ProjectManager
        Adding project '/Users/Shared/Unity_Roger/Thera_Practice/Assembly-CSharp-Editor.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Update project: Assembly-CSharp
[info]: OmniSharp.MSBuild.ProjectManager
        Update project: Assembly-CSharp-Editor
Received response for /findusages but could not find request.

@igorr0driguez
Copy link
Contributor

igorr0driguez commented May 12, 2022

Has anyone been able to make any progress in this? I've tried reassingning "FrameworkPathOverride" to point to my 6.12 Mono install but apparently had no success, still the same issues.

Has msbuild and mono in PATH but still a no.

How can we point the bundled OmniSharp to correctly point to a globally installed Mono?

In this issue: OmniSharp/omnisharp-roslyn#1948

Some Mac and Linux users were able to solve this by doing that.

@jrobertson98atx
Copy link

I have a version of LSP-OmniSharp that seems to be working with Unity on Mac. Part of that is specifying the mono binary location explicitly as a setting. Let me know if there's interest in getting this into the main repo.

@deathaxe
Copy link
Contributor

Should be fixed by PR #40, which makes transition to latest .NET 6+ based OmniSharp binaries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants