question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OmniSharp doesn't work if I choose 4.x .Net Runtime Version in Unity

See original GitHub issue

When I do so, I get ‘Attemped to update project that is not loaded’ error. Output log says that I don’t have .NETFramework,Version=v4.7.1 installed and that’s true as I have 4.7.2. If I manually change runtime version in .cproj files and then restart VS Code everything works perfect, but Unity changes it back to 4.7.1 on every build. Of course I can’t install 4.7.1 because 4.7.2 includes it and installer wouldn’t start.

So seems to be a bug there.

Environment data

dotnet --info output:

????? SDK ??? .NET Core (?????????? ????? global.json):
 Version:   2.1.401
 Commit:    91b1c13032

????? ??????????:
 OS Name:     Windows
 OS Version:  10.0.17134
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\2.1.401\

Host (useful for support):
  Version: 2.1.3-servicing-26724-03
  Commit:  124038c13e

.NET Core SDKs installed:
  2.1.202 [C:\Program Files\dotnet\sdk]
  2.1.302 [C:\Program Files\dotnet\sdk]
  2.1.401 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.3-servicing-26724-03 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

VS Code version: 1.27.2 C# Extension version: 1.16.2

Steps to reproduce

  1. Install .NET 4.7.2 if you don’t have it
  2. In Unity set API Compatibility level to 4.x
  3. Restart Unity
  4. Restart/Run VS Code
  5. Wait for OmniSharp init

Expected behavior

OmniSharp works

Actual behavior

OmniSharp doesn’t work

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:9

github_iconTop GitHub Comments

1reaction
szczygielmrcommented, Jan 16, 2019

I’m sure that it would but my system currently has .NET 4.7.2 and dual installations of .NET are not permitted to my knowledge.

v/r Mike

On Wed, Jan 16, 2019, 17:09 Ravi Chande <notifications@github.com wrote:

@szczygielmr https://github.com/szczygielmr @eastwing https://github.com/eastwing Does the SDK from https://www.microsoft.com/en-us/download/details.aspx?id=56119 not work?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/OmniSharp/omnisharp-vscode/issues/2589#issuecomment-454962862, or mute the thread https://github.com/notifications/unsubscribe-auth/AbkrVWgqHCONwVzCTgRMSyNk7kmJA6jGks5vD6MHgaJpZM4XMSz7 .

0reactions
rchandecommented, Jan 16, 2019
Read more comments on GitHub >

github_iconTop Results From Across the Web

Omnisharp error about dotnet version - Unity
NET Framework support, you can set omnisharp.useModernNet to false in your VS Code settings and restart OmniSharp. Changing that omnisharp.
Read more >
Visual Studio Code Intellisense doesn't work with Unity 2018
In VS Code, open 'Assembly_CSharp.csproj' file and change 'TargetFrameworkVersion' to what you installed .NET Framework SDK version
Read more >
OmniSharp - .NET and IntelliSense on any platform with your ...
OmniSharp is a family of Open Source projects, each with one goal - To enable great .NET development in YOUR editor of choice....
Read more >
C# - Visual Studio Marketplace
C# for Visual Studio Code (powered by OmniSharp). Installation ... If you still need Unity or .NET Framework support, you can set omnisharp....
Read more >
Unity + VS Code: omnisharp extension doesn't work in ...
While using Unity3D and VS Code in Manjaro, VS Code extensio omnisharp (for code completion and semantic cheking) can't load the assemblies ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found