Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 97327

Intellisense (VS Code) for Unity not working in Linux, requires .NET Dev Pack which is only available for Windows

$
0
0

I've recently installed Unity 2019.2.12f1 on my Linux Cinnamon 19.2 machine, and got Visual Studio Code purely for the Intellisense feature. However, as with all Microsoft products, something went wrong and I just can't get it working.

I followed all the instructions properly, installed .NET Core using Microsoft's instructions and the C# extension. I set VS as the default editor in Unity's preferences, and could successfuly open my project (not just an individual .cs file), however I didn't get any autocompleting when I typed Transform, void FixedUpdate, or anything to do with Unity.

I noticed that OmniSharp, what the C# extension is based on, was returning a [fail] and [warn]. I suspect this has something to do with or is straight-out causing the problem:

[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 '/home/ck/Unity Projects/USS3/Assembly-CSharp.csproj'.
/home/ck/Unity Projects/USS3/Assembly-CSharp.csproj
/home/ck/.vscode/extensions/ms-vscode.csharp-1.21.7/.omnisharp/1.34.7/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1191,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: /home/ck/Unity Projects/USS3/Assembly-CSharp.csproj

This is strange as I can clearly see Assembly-CSharp.csproj, mentioned in the error, in the sidebar explorer:

Assembly-CSharp.csproj in VS explorer
Anyway, I tried to follow the message's instructions on downloading the ".NET Developer Packs" by visiting this website, however I didn't see any Linux versions of the Dev Pack. I doubt running the Windows installer would work correctly, and if it did install it I don't know if VS would even recognize it. I also tried Googling for it, but with no luck...

I can't really get much done without Intellisense, so I'll need to sort this out sooner or later. Does anyone have any tips on resolving this?


Viewing all articles
Browse latest Browse all 97327

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>