A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Separate names with a comma.
Discussion in 'Code Editors & IDEs' started by stpaulgym, Jan 19, 2020.
In VS 2019 in the upper is button Attach to Unity just press it and syntax will highlight
Thx man i try this and it's work!!
This was the fix I was looking for as far as working on macOS in Unity 2019+ goes. Much love for the help.
pls i really need help,
i think its because of .NET i cant get intellesense and its hard to type code without this autocomplete system plssss i really need help its been an hour
guys pls help how do i remove .NET i want intellesense
THANK YOU SO MUCH! this worked for me after hours of searching. Restarted everything and Opened C# Solution.
I had the same but for me I changed it to v4.6 . Thanks a lot you saved my day
Can't get this to work on my mac - what .net version do you use? What "TargetFrameworkVersion" are you pointing out in the csproj file?
Damn this is the real OG. This combined with correcting the version in .csproj finally works on Mac VSCode (to 4.8 at the time of writing) and don't have to use Visual Studio. Thanks dude
Thank you so very much, this resolved my issue. I was really struggling to fix this. You are the best!
Magically resolved the issues, thanks a ton!
If there's a .gitignore in you repository, commnet out .sln (#.sln) in .gitignore so VSCode can recognize sln file, then you'll get IntelliSense working.
This worked for me...I was getting C# errors in the VSCode console, basically saying something about OmniSharp wasn't located for VS code 4.7.1... I already had 4.7.1 installed, but not the dev tools from the link.
Note, I had to install developer tools also, which may be obvious, but you need .NET 4.7.1 and the dev tools installed from the link. Restarted VS code after both were installed, and it works.
Still works in 2020.3.20f1 and VS Code 1.61. Thanks so much for the clear instructions!
worked for me good call
go to your project folder and look for the .proj files open them using vscode and find what .netframework version your project is using.
then go download that version. and install it
then reload your vscode window it should work.
This works thanks ! Also don't forget to install .NET Developper Pack 4.7.1
I bit the bullet and downloaded the full Visual Studio for Mac. I gave up on Visual Studio Code after a few hours of going in frustrating circles and trying several suggestions on the Unity forum and StackOverflow that didn't work.
One thing I noticed right off the bat is that the Visual Studio installation will automatically prompt you to download the necessary .NET stuff. I didn't have to run any commands to install things once Visual Studio was installed (although, I did download the dotnet and Mono installations previously for VS Code, so who knows if these were used or not...).
Once Visual Studio for Mac is installed, I went into Unity and gave Visual Studio Code the ol' boot by updating my preferences to open Visual Studio as my external editor:
Unity version: 2020.3
Unity > Preferences > External Tools > External Script Editor > Visual Studio for Mac [8.10.11]
I've also got Package Manager > Visual Studio Editor installed (2.0.11)
Finally, I opened my .cs file from within Unity (alternatively, you can right-click and select Open C# Project). Once Visual Studio opened:
Visual Studio > Preferences > Theme > Dark (we aren't barbarians...)
...and then File > Open > and opened my Unity game .sln file.
I went to the script in question to try things out and badda-bing-badda-boom, intellisense and all my stuff worked and opened without a hitch.
Best of luck.
Thank you so much. The only thing I have found to work!
WORKED! Thank you, bro!
It worked! Thank you so much!
You are the puto amo, mate
Guys! Before proceeding to more complex fixes like trying to pick proper versions, regeneration of project files etc., make sure that BASIC things are set up properly:
In VS code settings json:
omnisharp.monoPath - make sure this points to really existing folder with mono develop /bin folder inside
omnisharp.useGlobalMono - just set to "always"
So in my local set up it looks like:
That's THE ONLY fix that works for me throughout the years.
I have no "Developer: Reload Window"
I've gone through a lot of other "fixes" and I confirm this one is working ! a couple of clarifications:
- This needs to be updated in the C# extension settings, not the VS Code settings
- To know your monoPath, go to a terminal window in VS Code and type "which mono" (just don't consider the "/Commands/mono"). In my case as well, it was "/Library/Frameworks/Mono.framework/Versions/Current"
For me I had accidentally deleted the .Net tools version the omnisharp server was looking for (4.7.1), it says which one you're missing somewhere in the output after restarting the omnisharp server. I downloaded those and was good to go again.
Thanks man! Thats work fine for me!!!!!
Worked perfectly! thanks a lot
THIS IS THE SOLUTION!
Thanks! This solution worked for me. Another solution may be better as it may allow me to use the latest .Net SDK instead of 4.7.1, but at least for now I have Intellisense.
i already have that installed and am facing the same problem :///
This is the only solution I've found so far that works!!
If anyone is still having problems with intellisense in Visual Studio Code checkout this video:
Thank you, this worked for me.
I know it's a little bit off this topic, but since it's close enough, does anyone know the official state of the unity debugger extension in vscode? There are already 3 ignored open issues in the repo for almost 1 year, and - although it works ok for me - I worry it might stop working soon and I'll be orphaned of code editors (no, I won't use VS nor Rider).
Guys install the developer pack v4.7.1.Installing it will automatically solve the issue,it worked for me.Hope this helps OR Check out the output in VS Code where it shows 'Developer pack[name] not found' and install the developer pack.Hope this helps
Same for me, i gave up and installed the .NET framework 4.7.1 developer pack from here
If you all have NO INTELLISENCE working and all other extentions working. Just Downgrade C# into 1.24 or DOWN. I destroyed 2 mouses and one laptop to find a solution
install last version of dotnet developer.
fixed for me.
For me updating my .NET SDK package from 5 to 6 did the trick. Everything is working fine now.
Steps I had done before this were:
1. Installed latest .NET Framework SDK and Targetting pack (did not work)
2. Reinstalled unity visual studio code editor package (did not work)
3. Deleted unity library and .csproj files (did not work)
4. Tried setting to use visual studio and then back to vs code (did not work)
5. Tried deleting and cloning my git repo (did not work)
I found this to be the issue (something easy to fix): https://github.com/OmniSharp/omnish...er-ships-with-an-included-mono--msbuild-tools
This morning, I got an issue with IntelliSense because C# for Visual Studio Code was update to 1.25.0 yesterday and only show a few but not variables, methods and others inherited from component.
Although I have .Net framework 4.7.1 targeting pack
I fix by downgrade C# for Visual Studio Code back to 1.24.4
I'm not sure how to fix with 1.25.0 or maybe wait for 1.25.1 to be available in extension to fix it
dude, i kind love you.... somehow give me a call when you're feeling to hang out me on a date.
Thank you so much!!!!
Downgraded C# to v1.24.4 and everything is fine. Always the cat and mouse chase with VSCode and Unity...
This worked for me:
download & install the .Net Framework 4.7.1 Developer Pack here: https://dotnet.microsoft.com/downlo...k-you/net471-developer-pack-offline-installer
in Unity, go to Edit > Project Settings > Player > API Compatibility Level and change it to .NET 4.x
restart VSCode & Unity
Here's where I found this solution: https://stackoverflow.com/questions/59823422/vs-code-intellisense-not-working-for-unity3d
This seems to have been the issue for me as well. I looked at the changelog for the extension (1.25.0 changelog isn't visible on the web currently, only within VSC), and it mentioned disabling the "Use Modern Net" setting for Unity. I disabled that and reloaded, and I'm back up and running!
Thank you for mentioning this fix. Please could you guide me as to where I can disable the "Use Modern Net" setting from.
Edit: Found it at : Visual Studio Code IDE > C# extension settings. Thank you. It is working now.
This was a bit of surprise to me. After checking the optput log for c# it told me something like this:
vscode c# Error: Found dotnet version 3.1.100. Minimum required version 6.x
After a brief research I stumbled upon the fact that they disabled Unity support for C# by default. So either you have to install the dotnet version mentioned in the log or just uncheck this checkbox which I did. After restarting VSCode the intellisence worked again ;-)
That is just evil. Half of the day wasted to find the problem and fix it BECAUSE OUT OF F***ING NOWHERE, AFTER A NIGHT OF SLEEP AND NO ACTIVE MISHANDLING, INTELLISENSE WONT WORK ANYMORE
Superb trollbehaviour..big thanks for that.
thx anyway for pointing out this secret
It WORKED! Thankssss