OmniSharp doesn't work if I choose 4.x .Net Runtime Version in Unity
See original GitHub issueWhen 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
- Install .NET 4.7.2 if you don’t have it
- In Unity set API Compatibility level to 4.x
- Restart Unity
- Restart/Run VS Code
- Wait for OmniSharp init
Expected behavior
OmniSharp works
Actual behavior
OmniSharp doesn’t work
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:9
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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 @eastwing Does the SDK from https://www.microsoft.com/en-us/download/details.aspx?id=56119 not work?