Every time I edit my scripts I get redirected to visual studio which is fine but the file is labeled as “Miscellaneous Files” and the solution is named “Solution1” and the autofill doesn’t properly work as shown in the bottom image.
I have tried some other probable solutions like pressing “Reimport All” then pressing “Open C# Project” but it just does this: (also opens another window if one is already present) Image No.2
After thinking a bit I figured the existing solutions are probably outdated since some of them asked me to do stuff that i just couldn’t, like doing " go to Tools → Options… → Tools for Unity → Miscellaneous . Under Show connectivity icon , set it to true then restart Visual Studio." Image No.3
So please help me because I am completely stumped. I am using Visual Studio Community 2022 17.12.3 and Unity 2022.3.54f1. (I currently can’t provide more than one media file in a post.)
Check under Project Settings under “External Tools” that the correct VS version is set as your code editor.
Also you should close VS and Unity, then delete all .csproj and .sln files in the project root and then try again. This sometimes helps fix odd IDE problems.
This may help you with intellisense and possibly other Visual Studio integration problems:
Sometimes the fix is as simple as doing Assets → Open C# Project from Unity. Other times it requires more.
Other times it requires you also nuke the userprefs and .vsconfig and other crufty low-value high-hassle files that Visual Studio tends to slowly damage over time, then try the above trick.
Barring all that, move on to other ideas:
Also, try update the package inside of Unity: Window → Package Manager → Search for Visual Studio Editor → Press the Update button
Depending on flavor and version of Visual Studio, it may also have an installation step that you perform within the actual Visual Studio. This step seems finicky at best and may require multiple openings of VS before it comes up.
Update: The VSCode extension has been deprecated and abandoned:
Update: the VSCode integration is back… maybe!?
There may be a community fork available that is receiving updates.
Recently (July 2023) I worked on a Windows11 system that required a Microsoft component to be installed from within Visual Studio before it would work properly with all the OTHER software installed under Unity. I have no documentation on that process as I have only seen it once and it surprised me as well.