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
Intellisense not working on macos #5092
Comments
The reasons are explained in the log
|
Using OmniSharp on global Mono has lower precedence that using .NET 6.0 build of OmniSharp. According to your logs, .NET 6.0 build of OmniSharp is being used. Make sure to also set |
I updated my logs to make it shorter and more relevant as well as included everything I've tried so far. I also set userModerNet to false but after I did that the omnisharp fire logo disappear from my tool bar and now intellisense seems to be completely off. here is my user settings off everything omnisharp related (I removed "omnisharp.dotnetPath") |
According to the logs, the OmniSharp version in use is Please double check this setting because I made the typo above (the setting is To summarize, you should have the following for unity development on *nix:
If it does not help, try keeping the setting |
So upon setting useModernNet to false with useGlobalMono to "always" and even uninstalling and reinstalling c# extension I get an error saying : [ERROR] Error: Unable to find Mono. Ensure that Mono's '/bin' folder is added to your environment's PATH variable. I've added Mono /bin folder to my PATH here: export ## PATH=$PATH:/Library/Frameworks/Mono.framework/Versions/Current/binI found setting useModernNet = false and keeping useGlobalMono = always and deleting the sln and csproj files makes the error log go away, but Intellisense still missing some autocomplete classes. In this case I suspect the sln and csproj files might be the issue but they were auto generated by unity. Should I keep the sln and csproj files? there were more than one csproj but only one sln from what unity generated setting useModerNet to false and setting useGlobalMono to 'always' omnisharp log[ERROR] Error: Unable to find Mono. Ensure that Mono's '/bin' folder is added to your environment's PATH variable. setting useModernNet to false and setting useGlobalMono to "never" omnisharp logStarting OmniSharp server at 3/6/2022, 11:51:07 AM OmniSharp server started. Starting OmniSharp on MacOS 12.2.1 (x64) setting useModernNet to true and setting useGlobalMono to "always" omnisharp logStarting OmniSharp server at 3/6/2022, 11:53:20 AM OmniSharp server started with .NET 6.0.200 Starting OmniSharp on Unknown 0.0 (Unknown) |
OmniSharp comes in three versions:
The extension does not do anything fancy with respect to accessing your PATH - everything is inherited from VS Code, so if something is not visible, the problem likely lies in VS Code itself. However, irrespective of this we have a setting of |
ok I have set useModernNet to false and useGlobalMono to always but I am getting |
The warning refers to the version of MSBuild. You should install Mono from the preview channel. MSBuild 16.10 was only introduced in Mono 6.12.0.154 while stable channel is Mono 6.12.0.122. |
I downloaded mono 6.12.0 stable version for macos it still gives warning , was that the right version to download? there were only one other version which was 6.12.0 visual studio channel |
you need to download from the preview channel https://www.mono-project.com/download/preview/ where it is 6.12.0.173 |
oh thats what you mean by preview channel, looks like that fixed it - omnisharp appears to work properly now. Thank you! |
Issue Description
Intellisense doesn't seem to be working correctly, it seems to be missing some classes for C#.for example, I notice when I type the beginning words for the class "Input" it won't autocomplete. I am on Mac os with mono, and net core installed. at first my sln and csproj weren't being generated by Unity, so I had to go to Assets -> open C# file directly, while that generated the sln and csproj files, Intellisense still does not work
Steps to Reproduce
create new project in unity, create new script open script in vs code, try to get autocomplete by typing in "Inpu", however Input class does not appear
Expected Behavior
Type something like "GetComp" or "Inp" and GetComponent<> or Input should autocomplete in
Actual Behavior
Typing in the two classes above does not yield either GetComponent nor Input
Things I've tried
Logs
dotnet and mono info
Path
$PATH:$ORACLE_HOME/bin:/usr/vac/bin:/usr/vacpp/bin:/usr/local/share/dotnet/dotnet:/Library/Frameworks/Mono.framework/Versions/Current/bin/mono
export JAVA_HOME=/Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
OmniSharp log
Starting OmniSharp server at 3/6/2022, 1:30:36 AM
Target: /Users/MacBook/Library/Mobile Documents/com
appleCloudDocs/game development/Projects/Rocket boost/Rocket boost.slnOmniSharp server started with .NET 6.0.200
(/usr/local/bin/dotnet).
Path: /Users/MacBook/.vscode/extensions/ms-dotnettools.csharp-1.24.1/.omnisharp/1.38.1-beta.72-net6.0/OmniSharp.dll
PID: 25414
Starting OmniSharp on Unknown 0.0 (Unknown)
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 1 MSBuild instance(s)
1: .NET Core SDK 6.0.200 17.1.0 - "/usr/local/share/dotnet/sdk/6.0.200/"
info: OmniSharp.MSBuild.Discovery.MSBuildLocator
Registered MSBuild instance: .NET Core SDK 6.0.200 17.1.0 - "/usr/local/share/dotnet/sdk/6.0.200/"
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.ImplementTypeWorkspaceOptionsProvider, Order: 110
info: OmniSharp.MSBuild.ProjectSystem
Detecting projects in '/Users/MacBook/Library/Mobile Documents/com
appleCloudDocs/game development/Projects/Rocket boost/Rocket boost.sln'.info: OmniSharp.MSBuild.ProjectManager
Queue project update for '/Users/MacBook/Library/Mobile Documents/com
appleCloudDocs/game development/Projects/Rocket boost/Assembly-CSharp.csproj'info: OmniSharp.Script.ScriptProjectSystem
Detecting CSX files in '/Users/MacBook/Library/Mobile Documents/com
appleCloudDocs/game development/Projects/Rocket boost'.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/MacBook/Library/Mobile Documents/com
appleCloudDocs/game development/Projects/Rocket boost' on host 25170.info: OmniSharp.MSBuild.ProjectManager
Loading project: /Users/MacBook/Library/Mobile Documents/com
appleCloudDocs/game development/Projects/Rocket boost/Assembly-CSharp.csprojfail: OmniSharp.MSBuild.ProjectLoader
This project targets .NET version that requires reference assemblies that do not ship with OmniSharp out of the box (e.g. .NET Framework). The most common solution is to make sure Mono is installed on your machine (https://mono-project.com/download/) and that OmniSharp is started with that Mono installation (e.g. "omnisharp.useGlobalMono":"always" in C# Extension for VS Code).
[warn]: OmniSharp.MSBuild.ProjectManager
Failed to load project file '/Users/MacBook/Library/Mobile Documents/com
appleCloudDocs/game development/Projects/Rocket boost/Assembly-CSharp.csproj'./Users/MacBook/Library/Mobile Documents/com
appleCloudDocs/game development/Projects/Rocket boost/Assembly-CSharp.csproj/usr/local/share/dotnet/sdk/6.0.200/Microsoft.Common.CurrentVersion.targets(1220,5): Error: This project targets .NET version that requires reference assemblies that do not ship with OmniSharp out of the box (e.g. .NET Framework). The most common solution is to make sure Mono is installed on your machine (https://mono-project.com/download/) and that OmniSharp is started with that Mono installation (e.g. "omnisharp.useGlobalMono":"always" in C# Extension for VS Code).
Attempted to update project that is not loaded: /Users/MacBook/Library/Mobile Documents/com
appleCloudDocs/game development/Projects/Rocket boost/Assembly-CSharp.csprojdevice
Macos m1 chip
The text was updated successfully, but these errors were encountered: