Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Intellisense Not Working with Visual Studio (Fix)

Discussion in 'Code Editors & IDEs' started by DavidG_Fenex, Feb 27, 2020.

  1. sb33

    sb33

    Joined:
    Sep 9, 2021
    Posts:
    3
    Thanks Man it worked!!!
     
  2. frozenmangotree

    frozenmangotree

    Joined:
    May 2, 2020
    Posts:
    14
    nothing else worked but this worked thanks alot!!!!

    I wonder why is there visual studio code editor and then visual studio editor, why have both if the first one works just fine and the latter causes bugs?
     
  3. saadaamir3047

    saadaamir3047

    Joined:
    Sep 12, 2021
    Posts:
    4
    Thanks Man, It worked perfectly.
     
  4. AbhinandShibu

    AbhinandShibu

    Joined:
    Sep 11, 2021
    Posts:
    1
    I've done all but check if the editor attaching is ticked. However, I can't find an option for editor attaching?

    upload_2021-9-13_11-46-23.png

    I saw that it is displayed in the docs (below), though I can't seem to get it to appear on mine.

    upload_2021-9-13_11-48-24.png
     
  5. HasnainFareed7

    HasnainFareed7

    Joined:
    Oct 5, 2020
    Posts:
    44
    I think we have to press regenerate files afterwards too.
     
  6. unity_2860FC19C6F3B9622381

    unity_2860FC19C6F3B9622381

    Joined:
    Sep 25, 2021
    Posts:
    1
    Thank you soo much, it fixed all the errors
     
  7. HuyTran1612

    HuyTran1612

    Joined:
    Aug 7, 2019
    Posts:
    2
    That totally works for me. Manyyyyy thanks
     
  8. davidborbis

    davidborbis

    Joined:
    May 2, 2019
    Posts:
    26

    God bless you and your family!!
     
    Snok93 likes this.
  9. CGlow

    CGlow

    Joined:
    May 29, 2021
    Posts:
    1
    Thank you, very much! Appreciate it!
     
  10. FunFoxRR

    FunFoxRR

    Joined:
    Oct 18, 2020
    Posts:
    1
    THANKS SO MUCH!
     
  11. jeanandwar

    jeanandwar

    Joined:
    Oct 9, 2021
    Posts:
    1
    Thanks, it worked!
     
  12. michaelday008

    michaelday008

    Joined:
    Mar 29, 2019
    Posts:
    135
    None of this stuff is working for me.
    Unity 2020.3.20f1
    Visual Studio Community 2017 15.9.14

    I've tried:
    -ensuring all Unity packages (including visual studio editor) are up to date
    -deleting Library and letting it re-import everything
    -deleting all csproj files and then checking all boxes and re-generating the files.

    I still get this result:
    upload_2021-10-18_12-11-34.png
     
  13. michaelday008

    michaelday008

    Joined:
    Mar 29, 2019
    Posts:
    135
    The strange thing about this was that it was only happening in a single project on my computer. All other projects using that version of Visual Studio Community 2017 were working fine, even when I opened the same script as in the screenshot.

    I updated to Visual Studio Community 2019 and the issue went away. I'm really not sure why that was necessary since 2017 was working fine with Unity 2020.3.20f1 on all other projects on my machine.
     
  14. Rechronicle

    Rechronicle

    Joined:
    Dec 14, 2017
    Posts:
    32
    I fix the issue by repairing Visual Studio using 'Visual Studio Installer'
     
  15. Markido

    Markido

    Joined:
    Oct 21, 2021
    Posts:
    1
    This worked for me. Unity 2020.3.20f1 Personal.
    With Visual Studio 2019 Community.
     
  16. monderozturk

    monderozturk

    Joined:
    Oct 31, 2021
    Posts:
    1
    Thanks a lot, it worked for me, too.
     
  17. deltameta

    deltameta

    Joined:
    Nov 30, 2020
    Posts:
    5
    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.
     
  18. Adinbaryn-Galnagan

    Adinbaryn-Galnagan

    Joined:
    Nov 1, 2021
    Posts:
    1
  19. Dirt-e

    Dirt-e

    Joined:
    Jan 11, 2019
    Posts:
    6
    Post of the year! THX a lot!
     
  20. Drago_Space

    Drago_Space

    Joined:
    Nov 13, 2021
    Posts:
    1
    Thanks a lot, it helped!
     
  21. Fabii555

    Fabii555

    Joined:
    Sep 21, 2020
    Posts:
    1
    This awful bug has driven me crazy for about 3 days now.
    So, thank you man, your solution was the best thing that has happened to me in weeks! :D
     
  22. Jonathor

    Jonathor

    Joined:
    Nov 24, 2021
    Posts:
    1
    Absolute Legend it worked
     
  23. samueljleach23

    samueljleach23

    Joined:
    Nov 23, 2021
    Posts:
    1
    I tried basically anything that I saw resolved the issue for anyone else while I was researching. After a whole day of troubleshooting this the only thing that fixed it was going into the root folder of the project within file explorer and then on the .csproj files I changed the application type for opening that file type to VS Code. Additionally it seems I am only able to open a fully functional window of VS Code without opening it through Unity. When I open the project directory folder directly with VS Code and then launch my Unity project everything seems to function as it should

    Not sure if this will help anyone else but I wanted to throw it out there since I had such a hard time solving it myself.
     
  24. mastcharub

    mastcharub

    Joined:
    Feb 13, 2021
    Posts:
    1
    You saved my life!!!
    <3
     
  25. fakecrusader_unity

    fakecrusader_unity

    Joined:
    Jul 4, 2018
    Posts:
    4
    That's what worked for me, all of the above did nothing (in VS Code). And I think I found this out befoe and forgot about it...like you! Thanks for putting up the reminder for me.
     
  26. Fantassi

    Fantassi

    Joined:
    Dec 9, 2021
    Posts:
    1
    tyhank you so much i love you man
     
  27. jtok4j

    jtok4j

    Joined:
    Dec 6, 2013
    Posts:
    320
    Worked for me:

    Closed Visual Studio
    Opened Preferences in Unity Editor
    Click External Tools (Left hand menu)
    Change External Script Editor to: Visual Studio .... (Shows the full name)
    Clicked on the "Regenerate project files" button.

    Closed project/re-opened, double-clicked a script, Visual Studio launched and Intellisense is back!
     
  28. isaccaldas17

    isaccaldas17

    Joined:
    Apr 16, 2021
    Posts:
    1
    Thanks, that worked!
     
  29. CoalesceLanguidly

    CoalesceLanguidly

    Joined:
    Dec 21, 2021
    Posts:
    5
  30. muhammadmahin

    muhammadmahin

    Joined:
    Jan 2, 2022
    Posts:
    1
    It worked for me. thanks a lot.
     
  31. Deleted User

    Deleted User

    Guest

    @RowdyCoder I'm working on Unity 2020.3.25f1, and nothing was working. I did what you did and it worked! thank you :D
     
  32. goyalbl

    goyalbl

    Joined:
    Jan 24, 2022
    Posts:
    1
    Thanks for the quick solution :)
     
  33. sklyne

    sklyne

    Joined:
    Jan 27, 2022
    Posts:
    1
    Thanks David!!!
     
  34. UrDaddyWillCarry

    UrDaddyWillCarry

    Joined:
    Jan 25, 2022
    Posts:
    1
    THANKS SO MUCH IT WORKED
     
  35. QuigleyWelsh

    QuigleyWelsh

    Joined:
    Feb 2, 2022
    Posts:
    1
    That's awesome! It works like it should
     
  36. venetsia36

    venetsia36

    Joined:
    Feb 6, 2022
    Posts:
    2

    Thank you! worked for me as well!
     
  37. Husitaizi

    Husitaizi

    Joined:
    Feb 12, 2022
    Posts:
    1
    It works ! Thank you!
     
  38. Deleted User

    Deleted User

    Guest

    this somehow worked on 2020.3.28, thanks! :)
     
  39. unity_7JeWjGdEnmQwIA

    unity_7JeWjGdEnmQwIA

    Joined:
    Jan 24, 2021
    Posts:
    2
    Fuuuu

    After some hours lost in getting this thing done and nothing work to me I decided to look omnisharp log and it clearly states:

    Look the f installation page for mono. BUT READ IT ALL!!!!

    https://www.mono-project.com/download/stable/#download-lin-fedora (i use fedora, but choose whatever you have)

    important part:

    Install Mono
    dnf install mono-devel
    The package mono-devel should be installed to compile code.

    The package mono-complete should be installed to install everything - this should cover most cases of "assembly not found" errors.

    The package referenceassemblies-pcl should be installed for PCL compilation support - this will resolve most cases of "Framework not installed: .NETPortable" errors during software compilation.

    The package xsp should be installed for running ASP.NET applications.



    YES! Install mono-devel, mono-complete referenceassemblies-pcl AND xsp!
    close VSCODE and reopen it from inside Unity.

    you now have beautiful GET COMPONETE in your intellisense. FUUUUUUUUUUUUUUUu took me 2 hours!
     
  40. chutrieutung2000

    chutrieutung2000

    Joined:
    May 19, 2021
    Posts:
    1
    thank you so much!
     
  41. N0TKingminer7

    N0TKingminer7

    Joined:
    Oct 10, 2021
    Posts:
    1
    Thank you so much! It even works with VS 2022 and Unity 2020.3.22.
     
  42. Halbschatten

    Halbschatten

    Joined:
    Aug 18, 2015
    Posts:
    2
    thank you so much
     
  43. deandraper82

    deandraper82

    Joined:
    May 18, 2020
    Posts:
    1
    Thank you so much! Perfect solution! I have been losing my mind for days trying to figure this out.
     
  44. MayankVikash

    MayankVikash

    Joined:
    Mar 1, 2022
    Posts:
    1
    Thank you so much bro.
     
  45. Panickal

    Panickal

    Joined:
    Jan 9, 2022
    Posts:
    3
    I can't express my thank you. "Regenerate project files" in Preferences>External Tools fixed it. Finally I can get on with this project.
     
  46. ionalchemist

    ionalchemist

    Joined:
    Dec 26, 2018
    Posts:
    3
    I tried everything to make this work with Visual Studio Community 2019. Uninstalled and reinstalled. Tried all the suggestions in the thread and nothing worked. I prefer VS Community 2019 since that's what I've used for a long time.

    What ended up working for me is installing Visual Studio Code, and switching to that editor for my project. Still not thrilled, but using a less preferred editor w/ intellisense is better than none at all I suppose.

    (Edit): Although, the intellisense still does not perform like it does for users in the tutorials I watch. I don't get suggestions until I've typed a complete method or property. It will then just load a list of what already exists in the file. Guess I'll just have to remember everything. lol
     
    Last edited: Mar 9, 2022
  47. architgargi20095

    architgargi20095

    Joined:
    Jul 10, 2021
    Posts:
    2
    Thankkkk you sooooooo muchhhhhhhh IT HELPED A LOT!
     
  48. tgbailey

    tgbailey

    Joined:
    Mar 10, 2019
    Posts:
    1
    Top banana, big thanks...! other places have said update and reinstall, nothing worked apart from this! I couldn't find 'Editor Attaching' but obviously not a problem for me!
     
  49. Cato11

    Cato11

    Joined:
    Jan 5, 2021
    Posts:
    203
    Does anyone know how to get IntelliSense working for Shader files in Visual Studio Mac? I've never had an issue with IntelliSense in my C# files and it works perfectly, but I get nothing for .shader files. The MS Docs say that shaders are supported, but when I try the steps in the original post, i.e. enabling everything in External Tools and "Regenerate Project Files", it doesn't do anything..

    I'm new to Shaders so not having IntelliSense makes things extremely difficult. Please can somebody help?
     
  50. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,232
    Intellisense is constantly breaking for me (Unity 2019, VS Community 2019) and the debug drop changes. It might be when I switch to a 2020 project and back, I don't know, but I have to hit "Regenerate project files" every time it happens - to fix. Annoying!

    Also the Regenerate button is hidden away in preferences? Right now it is a regularly needed thing so it should be in a menu, not hidden away!

    Is this an MS bug, a Unity bug, where does the issue lie & when will it be fixed?