If you are getting this issue after you got the new update to the vs code and before everything was working normally
To solve the issue

 

  1. Download and install the official version of the unity extension . Announcing the Unity extension for Visual Studio Code - Visual Studio Blog fdsfasdf
  2. Go to package manager and unity registry , search “studio” and update both extensions to recommended version.
    Open the VSCode and check for code completion
  3. If still no code completion , Open the project folder and there you can see all your csproj files for eg : “Assembly-CSharp.csproj”
  4. Open the csproj file and search for word “TargetFramework”. You will see one like this <TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
  5. <TargetFramework>net7.0</TargetFramework> copy this and paste under the step 5 line. Do same for all your csproj files if you have more than one.

 

Now you can see code completion and syntax highliting etc.

+ Recent posts