No intellisense after Unity update

I have multiple projects.

Project A was started a month or so ago, in an older version of unity without the prefab updates.

Project B i started today.

I updated my Unity, when i hadn’t updated it in a while (4 or 5 months).

Project A now works with intellisense (autocompletion), has the new features of the update (new prefabs) etc.

Project B and any other projects that i start after updating now do not have intellisense working.

When i create new scripts in new projects and open them in visual studio code, i get the ‘Some projects have trouble loading. Please review the output for more details (Source: C# Extension)’ Error.

In the output it says visual studio code:

Starting OmniSharp server at 2/6/2019, 9:54:12 PM
    Target: e:\Game creation\Shapes\Shapes.sln

OmniSharp server started.
    Path: C:\Users\Emolk\.vscode\extensions\ms-vscode.csharp-1.17.1\.omnisharp\1.32.8\OmniSharp.exe
    PID: 4504

[info]: OmniSharp.Stdio.Host
        Starting OmniSharp on Windows 6.1.7601.65536 (x64)
[info]: OmniSharp.Services.DotNetCliService
        DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Located 2 MSBuild instance(s)
            1: Visual Studio Community 2017 15.6.27428.2015 - "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin"
            2: StandAlone 15.0 - "C:\Users\Emolk\.vscode\extensions\ms-vscode.csharp-1.17.1\.omnisharp\1.32.8\msbuild\15.0\Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Registered MSBuild instance: Visual Studio Community 2017 15.6.27428.2015 - "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin"
[info]: OmniSharp.Cake.CakeProjectSystem
        Detecting Cake files in 'e:\Game creation\Shapes'.
[info]: OmniSharp.Cake.CakeProjectSystem
        Could not find any Cake files
[info]: OmniSharp.WorkspaceInitializer
        Project system 'OmniSharp.DotNet.DotNetProjectSystem' is disabled in the configuration.
[info]: OmniSharp.MSBuild.ProjectSystem
        Detecting projects in 'e:\Game creation\Shapes\Shapes.sln'.
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for 'e:\Game creation\Shapes\Assembly-CSharp.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
        Detecting CSX files in 'e:\Game creation\Shapes'.
[info]: OmniSharp.Script.ScriptProjectSystem
        Could not find any CSX files
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpWorkspaceOptionsProvider
[info]: OmniSharp.WorkspaceInitializer
        Configuration finished.
[info]: OmniSharp.Stdio.Host
        Omnisharp server running using Stdio at location 'e:\Game creation\Shapes' on host 6680.
[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: e:\Game creation\Shapes\Assembly-CSharp.csproj
[fail]: OmniSharp.MSBuild.ProjectLoader
        The reference assemblies for framework ".NETFramework,Version=v4.7.1" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file 'e:\Game creation\Shapes\Assembly-CSharp.csproj'.
e:\Game creation\Shapes\Assembly-CSharp.csproj
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1126,5): Error: The reference assemblies for framework ".NETFramework,Version=v4.7.1" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.

[fail]: OmniSharp.MSBuild.ProjectManager
        Attemped to update project that is not loaded: e:\Game creation\Shapes\Assembly-CSharp.csproj

Changing to visual studio community 2017 in preferences and opening the script gives me this:

This is extremely annoying and has stopped me working all day. Any help would be appreciated.

Intellisense works ONLY in Visual studio 2015, however i much prefer visual studio code to work with.

I have tried reinstalling .NET, unity and visual code to no avail.

I’ve had this problem. Do what the prompt says (2nd option). Download that pack. Also move your workspace to the very top level within your project folder structure. That will allow Visual Studio Code to figure out the intellisense stuff. Fixed it for me!

I had the same problem with VSCode. Here is the solution that worked for me :slight_smile:

I hope it helps you too.

Thanks mate this worked.

Since my VC was looking for 4.7.1 i changed my 4.6.1 name to 4.7.1 and it worked!

I just had this problem after updating Unity and Visual Studio at the same time. I tried many of the different solutions people are posting about this.

Then I went to Visual Studio>Check for Updates, and it turns out MonoDevelop Framework was not installed :sweat_smile:. I installed it and the issue was immediately fixed. Just leaving this here in case this happens to anyone else in the future :stuck_out_tongue:

This probably won’t help you but after dealing with VS Code constantly breaking for over a year, I finally bailed and moved to Jetbrains Rider. No more troubles, just functional software. Well worth the “less than netflix” cost for peace of mind.

1 Like