Question about using VS code with Unity
Hi everyone! I just started game dev a couple days ago on unity, and came across a very annoying problem. Whenever I write a c# script on vs code through unity, intellisense doesn’t fully work, like it doesn’t give a red underline to errors or auto fill words like transform. Additionally, I always get this error that pops up on the bottom right that says “some projects have trouble loading”, but all my projects have loaded fine so far.
So far I’ve tried changing the external script editor directly to vs code, regenerated project files, changed target framework version in assembly, and some other things. I’ve already spent hours scouting the internet to find an answer. It’s extremely frustrating and I would greatly appreciate it if someone could help me out with this. Thanks in advance!
About this post
- Posted
- Archived
- Score
- 2 · 100% up
- Kind
- Text
- ID
- lb7ylb
9 comments
When you first boot up Visual Studio, and up until you get the "trouble loading" error, check your omnisharp output log. What does it say? (Click the little intellisense flame to get to the output log).
Deleted before we saved it.
I kind of wish you'd copied the whole thing. I've had a fair number of Omnisharp problems in the past and if I recall correctly the last time it was because I had 2 separate versions of MSBuild installed simultaneously and VSCode was trying to use the wrong one. I take it you've already tried installing the developer packs - maybe you have an older version installed as well.
I honestly think I'm just gonna switch to jetbrains rider, bc Im on mac. I think that may be the problem
I doubt it... I'd check the lines in your output below
OmniSharp.MSBuild.Discovery.MSBuildLocator
Did you install the Unity tools extension for Visual Studio? It’s not gonna work even with regenerate projects if you don’t have the tools installed in Visual Studio itself, usually it gives you an option
Edit:
it looks like this
I actually found out the problem before, it’s that apparent my dot net core wasn’t updated. Kinda funny cause I only found that when trying jetbrains as an alternative lol