Linux and VS-Code not working on Unity C# scripts

I’m having some real challenges getting autocompletion and other IDE standard things working with the C# libraries using VS Code with Unity.

I have Microsoft’s C# extension: @id:ms-dotnettools.csharp and Unity Code Snippets installed: @id:kleber-swf.unity-code-snippets

When I’m loading any script file, it gives me these errors:


The C# extension it recommends is this one: @id:ms-vscode.csharp, which got screwed up in the latest VS-Code release as seen here. I’ve tried this version as well.

I reinstalled following those directions, and still nothing. When I hover over an inheritable class called Agent from the Unity ML-Agents library in public class PenguinAgent : Agent, nothing appears. I also get no auto-complete or anything on any of the other C# code.

Any ideas why?

Has anyone out there gotten auto-completion and standard IDE tools working on VS-Code and Unity?

I am having the same problem with vim/VS code/Rider (have tried all 3). I tried in Unity Editor clicking “Assets → Open C# Project” but it did not help.

EDIT: I should mention for vim I have tried with both Omnisharp plugin as well as YouCompleteMe (which uses Omnisharp internally) and neither one can find a solution file.

I may have gotten it to work. I at least got YouCompleteMe to find the solution file. I’m not sure if there is full auto-completion functionality.

Anyways try “Edit → Preferences… → External Tools” and check “Generate all .csproj files”. You might try after “Assets → Open C# Project” not quite sure what that does to be honest but wouldn’t hurt.

It’s still giving me errors. Here’s the log with some of the paths shortened:

Starting OmniSharp server at 3/20/2020, 12:16:05 AM
    Target: ~/PenguinSetup/PenguinSetup.sln

OmniSharp server started.
    Path: ~/.vscode/extensions/ms-dotnettools.csharp-1.21.15/.omnisharp/1.34.14/run
    PID: 11834

[info]: OmniSharp.Stdio.Host
        Starting OmniSharp on ubuntu 19.10 (x64)
[info]: OmniSharp.Services.DotNetCliService
        DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Located 1 MSBuild instance(s)
            1: StandAlone 16.4 - "~/.vscode/extensions/ms-dotnettools.csharp-1.21.15/.omnisharp/1.34.14/omnisharp/.msbuild/Current/Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        MSBUILD_EXE_PATH environment variable set to '~/.vscode/extensions/ms-dotnettools.csharp-1.21.15/.omnisharp/1.34.14/omnisharp/.msbuild/Current/Bin/MSBuild.dll'
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Registered MSBuild instance: StandAlone 16.4 - "~/.vscode/extensions/ms-dotnettools.csharp-1.21.15/.omnisharp/1.34.14/omnisharp/.msbuild/Current/Bin"
            CscToolExe = csc.exe
            MSBuildToolsPath = ~/.vscode/extensions/ms-dotnettools.csharp-1.21.15/.omnisharp/1.34.14/omnisharp/.msbuild/Current/Bin
            CscToolPath = ~/.vscode/extensions/ms-dotnettools.csharp-1.21.15/.omnisharp/1.34.14/omnisharp/.msbuild/Current/Bin/Roslyn
            BypassFrameworkInstallChecks = true
            MSBuildExtensionsPath = ~/.vscode/extensions/ms-dotnettools.csharp-1.21.15/.omnisharp/1.34.14/omnisharp/.msbuild
[info]: OmniSharp.Cake.CakeProjectSystem
        Detecting Cake files in '~/PenguinSetup'.
[info]: OmniSharp.Cake.CakeProjectSystem
        Could not find any Cake files
[info]: OmniSharp.MSBuild.ProjectSystem
        Detecting projects in '~/PenguinSetup/PenguinSetup.sln'.
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '~/PenguinSetup/UnityEngine.TestRunner.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '~/PenguinSetup/Barracuda.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '~/PenguinSetup/UnityEngine.UI.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '~/PenguinSetup/Unity.TextMeshPro.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '~/PenguinSetup/Unity.Timeline.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '~/PenguinSetup/Unity.Mathematics.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '~/PenguinSetup/Assembly-CSharp.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '~/PenguinSetup/Unity.ML-Agents.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '~/PenguinSetup/Unity.Burst.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '~/PenguinSetup/MacBLAS.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '~/PenguinSetup/BurstBLAS.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '~/PenguinSetup/iOSBLAS.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '~/PenguinSetup/Unity.TextMeshPro.Editor.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '~/PenguinSetup/Unity.Timeline.Editor.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '~/PenguinSetup/UnityEditor.TestRunner.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '~/PenguinSetup/UnityEditor.UI.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '~/PenguinSetup/Unity.Rider.Editor.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '~/PenguinSetup/Barracuda-editor.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '~/PenguinSetup/Unity.CollabProxy.Editor.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '~/PenguinSetup/Unity.ML-Agents.Editor.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '~/PenguinSetup/Unity.VSCode.Editor.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '~/PenguinSetup/Unity.Burst.Editor.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '~/PenguinSetup/Assembly-CSharp-Editor.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '~/PenguinSetup/Unity.Mathematics.Editor.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
        Detecting CSX files in '~/PenguinSetup'.
[info]: OmniSharp.Script.ScriptProjectSystem
        Could not find any CSX files
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.ImplementTypeWorkspaceOptionsProvider, Order: 110
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.EditorConfigWorkspaceOptionsProvider, Order: 200
[info]: OmniSharp.WorkspaceInitializer
        Configuration finished.
[info]: OmniSharp.Stdio.Host
        Omnisharp server running using Stdio at location '~/PenguinSetup' on host 11575.
[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: ~/PenguinSetup/UnityEngine.TestRunner.csproj
[fail]: OmniSharp.MSBuild.ProjectLoader
        The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file '~/PenguinSetup/UnityEngine.TestRunner.csproj'.
~/PenguinSetup/UnityEngine.TestRunner.csproj
~/.vscode/extensions/ms-dotnettools.csharp-1.21.15/.omnisharp/1.34.14/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1193,5): Error: The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks

[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: ~/PenguinSetup/Barracuda.csproj
[fail]: OmniSharp.MSBuild.ProjectLoader
        The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file '~/PenguinSetup/Barracuda.csproj'.
~/PenguinSetup/Barracuda.csproj
~/.vscode/extensions/ms-dotnettools.csharp-1.21.15/.omnisharp/1.34.14/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1193,5): Error: The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks

[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: ~/PenguinSetup/UnityEngine.UI.csproj
[fail]: OmniSharp.MSBuild.ProjectLoader
        The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file '~/PenguinSetup/UnityEngine.UI.csproj'.
~/PenguinSetup/UnityEngine.UI.csproj
~/.vscode/extensions/ms-dotnettools.csharp-1.21.15/.omnisharp/1.34.14/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1193,5): Error: The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks

[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: ~/PenguinSetup/Unity.TextMeshPro.csproj
[fail]: OmniSharp.MSBuild.ProjectLoader
        The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file '~/PenguinSetup/Unity.TextMeshPro.csproj'.
~/PenguinSetup/Unity.TextMeshPro.csproj
~/.vscode/extensions/ms-dotnettools.csharp-1.21.15/.omnisharp/1.34.14/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1193,5): Error: The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks

[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: ~/PenguinSetup/Unity.Timeline.csproj
[fail]: OmniSharp.MSBuild.ProjectLoader
        The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file '~/PenguinSetup/Unity.Timeline.csproj'.
~/PenguinSetup/Unity.Timeline.csproj
~/.vscode/extensions/ms-dotnettools.csharp-1.21.15/.omnisharp/1.34.14/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1193,5): Error: The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks

[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: ~/PenguinSetup/Unity.Mathematics.csproj
[fail]: OmniSharp.MSBuild.ProjectLoader
        The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file '~/PenguinSetup/Unity.Mathematics.csproj'.
~/PenguinSetup/Unity.Mathematics.csproj
~/.vscode/extensions/ms-dotnettools.csharp-1.21.15/.omnisharp/1.34.14/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1193,5): Error: The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks

[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: ~/PenguinSetup/Assembly-CSharp.csproj
[fail]: OmniSharp.MSBuild.ProjectLoader
        The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file '~/PenguinSetup/Assembly-CSharp.csproj'.
~/PenguinSetup/Assembly-CSharp.csproj
~/.vscode/extensions/ms-dotnettools.csharp-1.21.15/.omnisharp/1.34.14/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1193,5): Error: The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks

[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: ~/PenguinSetup/Unity.ML-Agents.csproj
[fail]: OmniSharp.MSBuild.ProjectLoader
        The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file '~/PenguinSetup/Unity.ML-Agents.csproj'.
~/PenguinSetup/Unity.ML-Agents.csproj
~/.vscode/extensions/ms-dotnettools.csharp-1.21.15/.omnisharp/1.34.14/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1193,5): Error: The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks

[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: ~/PenguinSetup/Unity.Burst.csproj
[fail]: OmniSharp.MSBuild.ProjectLoader
        The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file '~/PenguinSetup/Unity.Burst.csproj'.
~/PenguinSetup/Unity.Burst.csproj
~/.vscode/extensions/ms-dotnettools.csharp-1.21.15/.omnisharp/1.34.14/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1193,5): Error: The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks

[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: ~/PenguinSetup/MacBLAS.csproj
[fail]: OmniSharp.MSBuild.ProjectLoader
        The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file '~/PenguinSetup/MacBLAS.csproj'.
~/PenguinSetup/MacBLAS.csproj
~/.vscode/extensions/ms-dotnettools.csharp-1.21.15/.omnisharp/1.34.14/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1193,5): Error: The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks

[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: ~/PenguinSetup/BurstBLAS.csproj
[fail]: OmniSharp.MSBuild.ProjectLoader
        The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file '~/PenguinSetup/BurstBLAS.csproj'.
~/PenguinSetup/BurstBLAS.csproj
~/.vscode/extensions/ms-dotnettools.csharp-1.21.15/.omnisharp/1.34.14/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1193,5): Error: The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks

[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: ~/PenguinSetup/iOSBLAS.csproj
[fail]: OmniSharp.MSBuild.ProjectLoader
        The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file '~/PenguinSetup/iOSBLAS.csproj'.
~/PenguinSetup/iOSBLAS.csproj
~/.vscode/extensions/ms-dotnettools.csharp-1.21.15/.omnisharp/1.34.14/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1193,5): Error: The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks

[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: ~/PenguinSetup/Unity.TextMeshPro.Editor.csproj
[fail]: OmniSharp.MSBuild.ProjectLoader
        The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file '~/PenguinSetup/Unity.TextMeshPro.Editor.csproj'.
~/PenguinSetup/Unity.TextMeshPro.Editor.csproj
~/.vscode/extensions/ms-dotnettools.csharp-1.21.15/.omnisharp/1.34.14/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1193,5): Error: The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks

[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: ~/PenguinSetup/Unity.Timeline.Editor.csproj
[fail]: OmniSharp.MSBuild.ProjectLoader
        The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file '~/PenguinSetup/Unity.Timeline.Editor.csproj'.
~/PenguinSetup/Unity.Timeline.Editor.csproj
~/.vscode/extensions/ms-dotnettools.csharp-1.21.15/.omnisharp/1.34.14/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1193,5): Error: The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks

[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: ~/PenguinSetup/UnityEditor.TestRunner.csproj
[fail]: OmniSharp.MSBuild.ProjectLoader
        The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file '~/PenguinSetup/UnityEditor.TestRunner.csproj'.
~/PenguinSetup/UnityEditor.TestRunner.csproj
~/.vscode/extensions/ms-dotnettools.csharp-1.21.15/.omnisharp/1.34.14/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1193,5): Error: The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks

[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: ~/PenguinSetup/UnityEditor.UI.csproj
[fail]: OmniSharp.MSBuild.ProjectLoader
        The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file '~/PenguinSetup/UnityEditor.UI.csproj'.
~/PenguinSetup/UnityEditor.UI.csproj
~/.vscode/extensions/ms-dotnettools.csharp-1.21.15/.omnisharp/1.34.14/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1193,5): Error: The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks

[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: ~/PenguinSetup/Unity.Rider.Editor.csproj
[fail]: OmniSharp.MSBuild.ProjectLoader
        The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file '~/PenguinSetup/Unity.Rider.Editor.csproj'.
~/PenguinSetup/Unity.Rider.Editor.csproj
~/.vscode/extensions/ms-dotnettools.csharp-1.21.15/.omnisharp/1.34.14/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1193,5): Error: The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks

[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: ~/PenguinSetup/Barracuda-editor.csproj
[fail]: OmniSharp.MSBuild.ProjectLoader
        The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file '~/PenguinSetup/Barracuda-editor.csproj'.
~/PenguinSetup/Barracuda-editor.csproj
~/.vscode/extensions/ms-dotnettools.csharp-1.21.15/.omnisharp/1.34.14/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1193,5): Error: The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks

[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: ~/PenguinSetup/Unity.CollabProxy.Editor.csproj
[fail]: OmniSharp.MSBuild.ProjectLoader
        The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file '~/PenguinSetup/Unity.CollabProxy.Editor.csproj'.
~/PenguinSetup/Unity.CollabProxy.Editor.csproj
~/.vscode/extensions/ms-dotnettools.csharp-1.21.15/.omnisharp/1.34.14/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1193,5): Error: The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks

[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: ~/PenguinSetup/Unity.ML-Agents.Editor.csproj
[fail]: OmniSharp.MSBuild.ProjectLoader
        The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file '~/PenguinSetup/Unity.ML-Agents.Editor.csproj'.
~/PenguinSetup/Unity.ML-Agents.Editor.csproj
~/.vscode/extensions/ms-dotnettools.csharp-1.21.15/.omnisharp/1.34.14/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1193,5): Error: The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks

[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: ~/PenguinSetup/Unity.VSCode.Editor.csproj
[fail]: OmniSharp.MSBuild.ProjectLoader
        The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file '~/PenguinSetup/Unity.VSCode.Editor.csproj'.
~/PenguinSetup/Unity.VSCode.Editor.csproj
~/.vscode/extensions/ms-dotnettools.csharp-1.21.15/.omnisharp/1.34.14/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1193,5): Error: The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks

[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: ~/PenguinSetup/Unity.Burst.Editor.csproj
[fail]: OmniSharp.MSBuild.ProjectLoader
        The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file '~/PenguinSetup/Unity.Burst.Editor.csproj'.
~/PenguinSetup/Unity.Burst.Editor.csproj
~/.vscode/extensions/ms-dotnettools.csharp-1.21.15/.omnisharp/1.34.14/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1193,5): Error: The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks

[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: ~/PenguinSetup/Assembly-CSharp-Editor.csproj
[fail]: OmniSharp.MSBuild.ProjectLoader
        The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file '~/PenguinSetup/Assembly-CSharp-Editor.csproj'.
~/PenguinSetup/Assembly-CSharp-Editor.csproj
~/.vscode/extensions/ms-dotnettools.csharp-1.21.15/.omnisharp/1.34.14/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1193,5): Error: The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks

[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: ~/PenguinSetup/Unity.Mathematics.Editor.csproj
[fail]: OmniSharp.MSBuild.ProjectLoader
        The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file '~/PenguinSetup/Unity.Mathematics.Editor.csproj'.
~/PenguinSetup/Unity.Mathematics.Editor.csproj
~/.vscode/extensions/ms-dotnettools.csharp-1.21.15/.omnisharp/1.34.14/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1193,5): Error: The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks

[fail]: OmniSharp.MSBuild.ProjectManager
        Attempted to update project that is not loaded: ~/PenguinSetup/UnityEngine.TestRunner.csproj
[fail]: OmniSharp.MSBuild.ProjectManager
        Attempted to update project that is not loaded: ~/PenguinSetup/Barracuda.csproj
[fail]: OmniSharp.MSBuild.ProjectManager
        Attempted to update project that is not loaded: ~/PenguinSetup/UnityEngine.UI.csproj
[fail]: OmniSharp.MSBuild.ProjectManager
        Attempted to update project that is not loaded: ~/PenguinSetup/Unity.TextMeshPro.csproj
[fail]: OmniSharp.MSBuild.ProjectManager
        Attempted to update project that is not loaded: ~/PenguinSetup/Unity.Timeline.csproj
[fail]: OmniSharp.MSBuild.ProjectManager
        Attempted to update project that is not loaded: ~/PenguinSetup/Unity.Mathematics.csproj
[fail]: OmniSharp.MSBuild.ProjectManager
        Attempted to update project that is not loaded: ~/PenguinSetup/Assembly-CSharp.csproj
[fail]: OmniSharp.MSBuild.ProjectManager
        Attempted to update project that is not loaded: ~/PenguinSetup/Unity.ML-Agents.csproj
[fail]: OmniSharp.MSBuild.ProjectManager
        Attempted to update project that is not loaded: ~/PenguinSetup/Unity.Burst.csproj
[fail]: OmniSharp.MSBuild.ProjectManager
        Attempted to update project that is not loaded: ~/PenguinSetup/MacBLAS.csproj
[fail]: OmniSharp.MSBuild.ProjectManager
        Attempted to update project that is not loaded: ~/PenguinSetup/BurstBLAS.csproj
[fail]: OmniSharp.MSBuild.ProjectManager
        Attempted to update project that is not loaded: ~/PenguinSetup/iOSBLAS.csproj
[fail]: OmniSharp.MSBuild.ProjectManager
        Attempted to update project that is not loaded: ~/PenguinSetup/Unity.TextMeshPro.Editor.csproj
[fail]: OmniSharp.MSBuild.ProjectManager
        Attempted to update project that is not loaded: ~/PenguinSetup/Unity.Timeline.Editor.csproj
[fail]: OmniSharp.MSBuild.ProjectManager
        Attempted to update project that is not loaded: ~/PenguinSetup/UnityEditor.TestRunner.csproj
[fail]: OmniSharp.MSBuild.ProjectManager
        Attempted to update project that is not loaded: ~/PenguinSetup/UnityEditor.UI.csproj
[fail]: OmniSharp.MSBuild.ProjectManager
        Attempted to update project that is not loaded: ~/PenguinSetup/Unity.Rider.Editor.csproj
[fail]: OmniSharp.MSBuild.ProjectManager
        Attempted to update project that is not loaded: ~/PenguinSetup/Barracuda-editor.csproj
[fail]: OmniSharp.MSBuild.ProjectManager
        Attempted to update project that is not loaded: ~/PenguinSetup/Unity.CollabProxy.Editor.csproj
[fail]: OmniSharp.MSBuild.ProjectManager
        Attempted to update project that is not loaded: ~/PenguinSetup/Unity.ML-Agents.Editor.csproj
[fail]: OmniSharp.MSBuild.ProjectManager
        Attempted to update project that is not loaded: ~/PenguinSetup/Unity.VSCode.Editor.csproj
[fail]: OmniSharp.MSBuild.ProjectManager
        Attempted to update project that is not loaded: ~/PenguinSetup/Unity.Burst.Editor.csproj
[fail]: OmniSharp.MSBuild.ProjectManager
        Attempted to update project that is not loaded: ~/PenguinSetup/Assembly-CSharp-Editor.csproj
[fail]: OmniSharp.MSBuild.ProjectManager
        Attempted to update project that is not loaded: ~/PenguinSetup/Unity.Mathematics.Editor.csproj

I really am hoping for some kind of fix, but for now, I’ve had to switch to Jetbrains Rider. I don’t think you can use Unity3D, Linux, and Visual Studio Code to do what I’m getting in Jetbrains:

1 Like

So the errors you are seeing are omnisharp not being able to resolve the proper .net framework. I have seen this before and you generally need to have mono installed. Rider deals with this a lot better overall.

Yes, I installed mono-complete using this tutorial, and I at least get some autocomplete. Still not as good as typical VS-Code javascript integrations, but it works:

On Solus the only editor I can get autocomplete to work is Rider, which I like but unfortunately is a pay per month IDE.

I can get VIM and VSCode to work but no autocomplete.

Hi,

I’m on Ubuntu 20.04 and I found a way to make mine work.
Basically, I set the env FrameworkPathOverride to /usr/lib/mono/4.5/ before opening vscode. To make that easy, I set that variable from a .desktop file before opening UnityHub.AppImage. And that would pass the variable to vscode.

The relevant line is

Exec=env FrameworkPathOverride=/usr/lib/mono/4.5/ ~/Applications/unity/UnityHub.AppImage
2 Likes

Thanks for this post! Solved my problem and a lot of headache.

Thank you so much man. You are an absolute genius. Thanks man again!

Hi,

I’m on Debian 12 (bookworm), I was getting the “No installed .NET SDK was found on the computer. If it is installed, make sure it can be found through the PATH environment variable.” error, and setting the PATH to the .profile or .bashrc did not work for me, but following the finalherizo thought process, I was able to get it to work by setting the PATH before VSCode executes, adding

PATH=$PATH:/home/<user>/.dotnet

to the

/usr/share/code/bin/code

file.

I hope this can help