No suggestions in Vscode

Hey, I recently installed unity on linux and tried connecting Unity with Vscode. Turns out it’s one big enigma, I searched all forums and either the answer was one windows or it just didn’t work.
The weird part is that it worked at some point, I remember yesterday i got it to work but today i wake up eager to continue working on my project, and boom no suggestions.

Important:
I am getting, “Some projects have trouble loading” from the c# extension I assume it is somehow related. here is the output:

Starting OmniSharp server at 8/20/2020, 12:13:13 PM
Target: /home/artiom/Desktop/unity-workspace/Gravity/Gravity.sln

OmniSharp server started.
Path: /home/artiom/.vscode/extensions/ms-dotnettools.csharp-1.23.1/.omnisharp/1.37.0/run
PID: 13033

[info]: OmniSharp.Stdio.Host
Starting OmniSharp on ubuntu 20.4 (x64)
[info]: OmniSharp.Services.DotNetCliService
DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Located 1 MSBuild instance(s)
1: StandAlone 16.8.0 - "/home/artiom/.vscode/extensions/ms-dotnettools.csharp-1.23.1/.omnisharp/1.37.0/omnisharp/.msbuild/Current/Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
MSBUILD_EXE_PATH environment variable set to '/home/artiom/.vscode/extensions/ms-dotnettools.csharp-1.23.1/.omnisharp/1.37.0/omnisharp/.msbuild/Current/Bin/MSBuild.exe'
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Registered MSBuild instance: StandAlone 16.8.0 - "/home/artiom/.vscode/extensions/ms-dotnettools.csharp-1.23.1/.omnisharp/1.37.0/omnisharp/.msbuild/Current/Bin"
CscToolExe = csc.exe
MSBuildToolsPath = /home/artiom/.vscode/extensions/ms-dotnettools.csharp-1.23.1/.omnisharp/1.37.0/omnisharp/.msbuild/Current/Bin
CscToolPath = /home/artiom/.vscode/extensions/ms-dotnettools.csharp-1.23.1/.omnisharp/1.37.0/omnisharp/.msbuild/Current/Bin/Roslyn
BypassFrameworkInstallChecks = true
MSBuildExtensionsPath = /home/artiom/.vscode/extensions/ms-dotnettools.csharp-1.23.1/.omnisharp/1.37.0/omnisharp/.msbuild
[info]: OmniSharp.Cake.CakeProjectSystem
Detecting Cake files in '/home/artiom/Desktop/unity-workspace/Gravity'.
[info]: OmniSharp.Cake.CakeProjectSystem
Could not find any Cake files
[info]: OmniSharp.MSBuild.ProjectSystem
Detecting projects in '/home/artiom/Desktop/unity-workspace/Gravity/Gravity.sln'.
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for '/home/artiom/Desktop/unity-workspace/Gravity/Assembly-CSharp.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
Detecting CSX files in '/home/artiom/Desktop/unity-workspace/Gravity'.
[info]: OmniSharp.Script.ScriptProjectSystem
Could not find any CSX files
[info]: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
[info]: OmniSharp.MSBuild.ProjectManager
Loading project: /home/artiom/Desktop/unity-workspace/Gravity/Assembly-CSharp.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.BlockStructureWorkspaceOptionsProvider, Order: 140
[info]: OmniSharp.WorkspaceInitializer
Configuration finished.
[info]: OmniSharp.Stdio.Host
Omnisharp server running using Stdio at location '/home/artiom/Desktop/unity-workspace/Gravity' on host 12919.
[fail]: OmniSharp.MSBuild.ProjectLoader
The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
[warn]: OmniSharp.MSBuild.ProjectManager
Failed to load project file '/home/artiom/Desktop/unity-workspace/Gravity/Assembly-CSharp.csproj'.
/home/artiom/Desktop/unity-workspace/Gravity/Assembly-CSharp.csproj
/home/artiom/.vscode/extensions/ms-dotnettools.csharp-1.23.1/.omnisharp/1.37.0/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1178,5): Error: The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks

[fail]: OmniSharp.MSBuild.ProjectManager
Attempted to update project that is not loaded: /home/artiom/Desktop/unity-workspace/Gravity/Assembly-CSharp.csproj

I installed everything needed(.NET, C# extension, Unity Tools) yet it is still not working.
Basic C# suggestions are working.
I also put the binary file of vscode as the external tool of unity

Thanks in advance!

This may help you with intellisense problems:

hi! I tried what you suggested but unfortunately it didn’t help. Thank you for trying to help though. I think ill just install a windows VM, because i remember easily setting Intellisense up there

I had lots of problems with setting up VSCode as well after a system crash I had. You have the C# extension set up so that is good, you also need the extension called Unity Snippets, also if you want to do debugging there is an extension for that too, you can find it by searching for unity debugger.

Now the solution for me (that I couldn’t find online, only the problem) was to update the VSCode package inside of Unity. Yes there is a package for VSCode, I was surprised. You jost go: Window → Package Manager → Search for Visual Studio Code Editor → Press the Update button

Hope that this will solve it for you too.

1 Like

@Gramms66 I am going to add your idea to my handy list of troubleshooting items for this issue. Hopefully this will get OP going again!

1 Like

Thanks you but the package manager said it’s up to date :/. also sadly the vm idea went horribly wrong so yeah im stuck again with 0.5% auto-completion.
EDIT: Thanks for the extensions too

I had the same issue and here is how I fixed it.

  1. Download the latest stable Mono here
    Download - Stable | Mono

  2. Add FrameworkPathOverride to the .bash_profile
    export FrameworkPathOverride=/Library/Frameworks/Mono.framework/Versions/Current

Restart VSCode and It works.

2 Likes
MonoBehavior not recognized in Visual Studio
Visual Studio Code Editor 'Implement method' shortcut
My autocomplete wont work
Problème de déplcement de mon personnage en 2D
visual studios not connecting to unity
Visual Studio
I just can't open visual studio. Plz help?
#if UNITY_STANDALONE_WIN doesnt working?
Visual Studio solution explorer empty - No Intellisense either - Please help!!!
Visual Studio 2019 not displaying info on classes
Preprocessing directives aren't defined in VS2019 during editing?
Not always highlight and autofill
Visual studio 2022 don't highlight the errors
Visual Studio Not Showing Multiple Unity-Related Features
Having trouble getting VS code to work with unity on new PC
Visual Studio error CS0246 and CS0234 - The type or namespace name...could not be found.
VS Code Error [SOLVED]
MonoBehavior is not defined as class
How to get Unit Autocomplete in VSCode
I installed the unity workload to microsoft visual studies but it's not doing anything.
Help figuring out Mistake
Question with C# Visual Studio
The type or namespace name 'UI' does not exist in the namespace 'UnityEngine'
Unity 2021.3.4f1 doesn't generate csproj files. Can't regenerate them either.
error CS0246: The type or namespace name 'Controller' could not be found
HELP! VSCode Intellisense stopped working (Again!...)
Downloading Visual Studio for the first time.....HELP
Auto NameSpace implementation
Renamed a class/file, now "the name does not exist in the current context"
Code Monkey 2023 Free Course
Unable to open c# script
Anyone having trouble with Autocomplete missing some situations in VS?
Base Class Inheritance issue
Visual Studio Can't Find Monobehavior?
trouble with auto-replacing in a C# script.
Unity instance missing in "Attach Unity Debugger"
"the type or namespace name Transform could not be found" it also says that for MonoBehaviour
Weird error
Unity 2019 & visual studio solution trouble. Custom added project removing after unity restart
Autocomplete not working.
onCollisionEnter2D Not Working!! :(
How to debug Unity with Vscode in 2022?
new UnityEngine.UIElements.Image().fillAmount does not exist
I can't use visiual studio code
Editor randomly switches from Visual Studio to VSCode
Track Changes stopped working on my Unity project in Visual Studio 2022
Curly braces not properly aligning
Scripting Program will not open
Visual studio wont show errors or suggest code, why?
Private member 'xxxx.Start' is unused
[Solved] The type or namespace 'UI' does not exist in namespace 'UnityEngine' and more
Debugging broken
Vscode
A couple problems with visual studios.
Scripts don't open with Visual Studio 2019 Through Unity
Can't Open Script on Mac Ventura 13.2.1
Visual Studio starting afresh each time
Errors not showing script line like they used to
We need a simple >(); completation.
Need Help In Visual Studio
Visual Studio misconception
Visual Studio Intellisense randomly stopped working, any way to fix?
Monodevelop add-in
VS Code Setup for Unity
How to get visual studio intellisense
Issues With Visual Studio "using" Directives
MonoBehaviour is red but no error in console How to debug?
VSCode integration not working
Canceling 'Remember My Choice
When I look at the code with VS, the first time there is code highlighting, but the second time it doesn't
Need help with VScode
error CS0246
RigidBody disappear
Getting a red underline when referencing a script in a variable
No AutoComplete in any IDE, VSC not even showing as option
Using UnityEngine.UI fails to be regognised by Visual Studio 2022
Visual Studio Code Dont AutoComplateing
Visual problem
Updated Unity. Now C# code is giving me loads of false negatives
Can anyone help me with my code?
Visual studio unable to find namespaces
On M1 Macbook Pro, I cannot get intellisense/code completion to work VS Code, any solution?
Unity LTS : How to activate Intellisense
Latest 2019 LTS breaks VS integration. Development basically impossible without fix.
Suddenly My Visual studio is giving me 100s or thousand errors saying it doesn't recognize "System"
wierd intellisense coloring ( VS 2019 )
Upgraded to Visual Studio 2022 no .Net 4.x
Intelisense stopped working in vs code
Assembly references not working
Is a type but is used as a variable error, please help!
Double clicking on C# script to open Visual Studio does not automatically open the clicked script
Intellisense/Colors not working after upgrading to VisualStudio Editor 2.0.11
Visual Studio Code does not recognize C# syntax on Unity.
Unity 2022.2.13f1 breaks intellisense
Assembly-CSharp could not be found.
Make string parameters show suggestions in Rider
Couldn't find name space
Auto suggestions are not working in Visual Studio 2019 Community edition
VisualStudio Project Selector
Cannot open C# scripts! In need of help!
error CS0246: Showing in Unity but not Microsoft Visual Studio
How can make editor to show function variable types
VSCode - Unity, "suggestions"
C# script not loading visual studio [SOLVED]
Please help
My Scripting Define Symbols are gone, how to regenerate them?
Visual Studio isn't doing the thing
Intellisense not working on Mac in VS Code nor in VS Community
[Possibly solved] Unzipped unity project compiles fine but visual studio is blanketed in red errors.
Unity and Visual studio keep losing each other
Visual Studio Unknown Error
Problems with importing (Visual Studio)
erreurs soulignées
Adding assets from manager does not include scripts in my project.
Unity Editor Not Loading Visual Studio
Class Provided Script Not Working, Need Help
Visual studio doesn't show Intellisense for Unity methods found in Assembly Definition
I've put using TMPro; (textmeshpro) but it wont let me use TMPro options? e.g TextMeshProUGUI
Color editor difficulties
MonoBehaviour is red but no error in console How to debug?
Visual Studio Code Editor won't load Always get Text Editor
Visual Studio 2019: Private member "..." is unused
Intellisense Not Working Correctly in VSCode
External script editor not showing VScode as an option.
Unity pre-preocessor defines not recognized in VS 2022 for Windows
!!HELP!!
VS code works incorrect
Problem with monobehaviour
Not showing IntelliSense descriptions anymore
Error when opening scripts
The package in the "Plugins" folder is not visible in the Scripts.
Error CS0234 after updating the editor and hub.
Installed unity editor but now the Intellisense are not working with Visual Studio, ho to fix it ?
Unity's script auto-completion system is not complete and may be should be remastered.
Visual Studio does not highlight or prompt variables
Is something wrong?
Visual Studio Solution and Project Files not generating
Unity is not creating UnityEditor .csproj files
Unable to identify rigidbody2D
3 Assembly Definitions but getting only one project
Visual Studio - no documentation text for System types
VS Code suddenly stopped recognizing some unity namespaces
Visual Studio Code not recognising Type
Visual Studio keep closing program
VSC with Unity
Trouble installing Unity 5.3.5f1
coding not translating to unity.
the Rigidbody isn't working on my code, it is not getting selected
Visual Studio Doesent AutoCompletes Properly
SystemInfo not working?
VSCode don't recognize a Namespace
Assembly definition, TMPro and ES3 error
Visual Studio stopped recognizing Unity
When using VS Code I get this error message "The NET Core SDK cannot be located..."
intellisense vs code
Script in Editor cannot access Project scripts
erhh problem with vscode when use with unity
No code suggest in new extention (C# for visual code)?
Incorrect visual studio project generation, Unity 2020.3.29f1
Visual Studio IDE
Autocomplete doesn't work on newly added C# script
External Script Editor
How do I install NodaTime in Unity 2021.3?
Unity opens this loading bar that says it will open visual studio but it just keep on loading.
Visual Studio doesn't identify "InputManager"
Using F12 doesn't allow tracking to the function definition.(Via Vs2022)
Minigame 'spawn'
[SOLVED] VS Code does not recognize Unity
No Assembly-CSharp-Editor, firstpass files.
[SOLVED] VS Code does not recognize Unity
when i type simple code such as Debug.Log("hello "); it says too many characters in character liter
Hard problems with VS
Class not accepted?
Assembly-Csharp.csproj unloaded in visual studio
What's up with visual studio??
How to fix VS
Get Text component
Fungus script goes wrong
why visual studio opening
Generated .csproj source path invalid (Visual Studio Code Editor 1.2.4?)
How to write a simple shader code in unity3d with visual studio ?
New Visual Studio SDK Version? Unity doesn't work
UnityEngine.UI, InputSystem, TMPro, etc not found in namespace
My code wont work because...?
Code Completetion in Visual Studio Code not working at all
How to start scripting?
Conditional compilation doesnt work anymore
Compile error showing in unity, not showing in Visual Studio
Hello, using System.Collections; using System.Collections.Generic They don't work Please help me
Funtcion not show
Code editor with unity suggestions as you type
Visual Studio 2017 Enterprise UnityEngine.UI Missing
"Identifier Expected" Error on an enum inside a struct
Unity CS2012: Cannot open 'Assembly-CSharp.dll' for writing
VS Code not recognizing things yet they still work
QUESTION: VSCode IntelliSense not working
vs code debug error
VS Studio 2019 not working with intellisense
"Misc Files" in top left corner wont let me script in VS19
Intellisense visual studio code not working, version 1.62.3 (user setup)
2020 version reload
Having problems with the Script
stuck with loading bar, if I try to open a script
How to prevent VS Code stop on UnityEngine.ExitGUIException? Or how to fix it.
Problem with shadow component
2 CS0234 errors and 1 CS0246 error
Updated VS2019 and now my output is full of Info-level junk.
Unity doesn't launch Visual Studio when trying to edit a script
Red Highlights in Visual studio code. No syntax errors?
Unity preferences freeze, visual studio/visual studio package
2020.2.1f1 VS error
Unity VSCode Intellisense
Intellisense not working when coding non-monobehaviour scripts
I can't open the scripting program.
Assembly-CSharp.csproj error
Unsure how to fix errors in code
VS Code Breakpoints become "Unverified" (turn gray) when attaching to Unity
Having some trouble getting intellisense working in visual studio.
Unsupported project type in Visual Studio
MathF.Infinity error
VS Code autocomplete not working
UnityEngine.UI not work
Cannot add new reference to script
There are red lines everywhere
Game won't play in Editor with Visual Studio attached
Solution doesn't load
UnityEngine.EventSystems where did it go?
Visual Studio Not Showing Errors
issues with visual studios.
VSCode does not recognize Unity Namespaces [Unity Package]
VSCode - Intellisense not working when I copy a project - P.S. regenerate project files does not fix
Miscellaneous Files bug in Visual Studio has rendered my project impossible to work on
Visual Studio says build error. Unity shows no issue
Support for Cursor AI IDE?
How to specify c# version in visual studio?
Visual studio C# debugging is a pain to setup
VsCode Intellisense not working
Atom script editor not working with unity
Editing Scripts in VS IDE Doesn't Show Error Squiggles
This code is correct but the error is fake, change my mind
VS Code doesn't Recognize Unity Classes
Where Are the Good Code Editors for a Solo Dev?
Can't seem to make a working script
Why does my character float after jumping? Different FPS? How to solve?
Audio middleware unity package missing assembly references
Unity to visual studio
Problem with Predictive text on Visual Studio in Unity.
(Resolved) VSCode and Editor on Linux | What happens when VSCode is from AUR and Unity is from Flathub
confusion of Start and start functions...
ENABLE_INPUT_SYSTEM Not Activating in Starter Assets with Both Input Settings Tried
Referencing other script causes error, causes "void start" to become unused
Omnisharp won't update project?

Thanks for the reply, first of all now when i do “sudo apt update” i get this output

W: GPG error: https://download.mono-project.com/repo/ubuntu stable-focal InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A6A19B38D3D831EF
E: The repository 'https://download.mono-project.com/repo/ubuntu stable-focal InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: https://download.mono-project.com/repo/ubuntu vs-bionic InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A6A19B38D3D831EF
E: The repository 'https://download.mono-project.com/repo/ubuntu vs-bionic InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Second im not sure when exactly you want me to put the FrameworkPathOverride, I found a .bash_profile.save in home but didn’t find a .bash_profile. I put it there and it didn’t work. do you mind helping here? I actually didn’t try this fix and I think it might actually work

I solved the same issue by downgrading VSCode C# extension from 1.23.1 to 1.23.0

2 Likes

@Teos that solved this issue for me! Much appreciated.

EDIT: thank you so much, downgrading to 1.23.0 didn’t actually help, but going a little lower helped.

1 Like

@Teos , it works. Finally. I’m on Mac OSX and this is the simplest but most effective way I found to solve this.

I had the same issue with different versions:
Unity 2020.3.0f1
Visual Studio 2019 Mac
Visual Studio Code Editor 1.2.3
Visual Studio Editor 2.0.7
I downgraded both one version to 1.2.2 and 2.0.5 and then it worked again!

Tried all above. Downgrading C# extension from 1.25.0 to 1.23.0 solved it.

Good luck out there!

I found a solution without downgrading. I too was getting the error “Omnisharp server is not running” and downgrading didn’t work for me. At one point it fixed itself but then stopped working again in the next session. This solution below seems to fix it permanently.

  1. Go to settings.json in the .vscode folder

  2. Put this line in just above “files.exclude”:
    “omnisharp.useModernNet”: false,

  3. Save settings.json

  4. You should get a prompt asking if you want to restart OmniSharp. Say yes. It might now already be fixed, but if it complains that the “OmniSharp server is not running” goto step 5

  5. Restart vscode

  6. Remove the line mentioned in step 2, save, hit “restart OmniSharp” on the prompt, put the line back in again, save, hit “restart OmniSharp”.

Sorry, new to VS Code and Unity where. Where exactly do I go to run the expory command? export FrameworkPathOverride=/Library/Frameworks/Mono.framework/Versions/Current.

I downgraded but I was only able to debug once…