dotnet / vscode-csharp

Official C# support for Visual Studio Code
MIT License
2.87k stars 675 forks source link

Unity + VScode + Omnisharp + Mac not working #675

Closed HawkenKing closed 8 years ago

HawkenKing commented 8 years ago

Intellisense keeps rebuilding as you type. It's broken.

From the plugin docs:

However, support for Unity and Xamarin, and other .csproj-based projects has been temporarily disabled for OS X and Linux. Rest assured that this will be restored in the near future!

In the meantime, you can install and use this the Legacy OmniSharp extension to enjoy a great C# editing experience on OS X and Linux for .csproj-based projects, such as Unity and Xamarin.

Sadly this is not true! On Mac and it keeps rebuilding as you type.

Can't downgrade VScode to 0.10.3 (omnisharp works on this version) as this version has a bug where auto update can't be turned off, so it just reinstalls to the latest version again.

This is a bug in both "Legacy C# support" and "C#" plugins on mac.

Please you're our only hope on mac...

DustinCampbell commented 8 years ago

@HawkenKing, the plugin doc text you provided is out-of-date, could you link to it so I can update it?

The latest C# extension (1.3) does work on OS X with Unity, though there are some known issues with larger projects. Could you clarify?

HawkenKing commented 8 years ago

Hi thanks for the reply.

The plugin text quote above is from the about page for "Legacy OmniSharp Support for Visual Studio Code" version 0.3.3 (select extension in extensions panel)

The exact problem is best shown in this gif. Have tried this on all three of my macs, same problem. 9e4981c2-55be-11e6-9274-f3cd1ec91c99

See how the "references" text disappears then rebuilds? Happens about every 5 seconds while typing, both "Legacy C# support" and "C#" plugins on mac.

HawkenKing commented 8 years ago

Also I get this error when using "C#" plugin on mac.

screen shot 2016-08-18 at 3 50 03 pm

error: System.Net.Http 4.1.0 provides a compile-time reference assembly for System.Net.Http on .NETCoreApp,Version=v1.0, but there is no run-time assembly compatible with osx.10.11-x64. error: System.AppContext 4.1.0 provides a compile-time reference assembly for System.AppContext on .NETCoreApp,Version=v1.0, but there is no run-time assembly compatible with osx.10.11-x64. error: System.Linq 4.1.0 provides a compile-time reference assembly for System.Linq on .NETCoreApp,Version=v1.0, but there is no run-time assembly compatible with osx.10.11-x64. error: System.Linq.Expressions 4.1.0 provides a compile-time reference assembly for System.Linq.Expressions on .NETCoreApp,Version=v1.0, but there is no run-time assembly compatible with osx.10.11-x64. error: System.Security.Cryptography.X509Certificates 4.1.0 provides a compile-time reference assembly for System.Security.Cryptography.X509Certificates on .NETCoreApp,Version=v1.0, but there is no run-time assembly compatible with osx.10.11-x64. error: System.Text.RegularExpressions 4.1.0 provides a compile-time reference assembly for System.Text.RegularExpressions on .NETCoreApp,Version=v1.0, but there is no run-time assembly compatible with osx.10.11-x64.

error: One or more packages are incompatible with .NETCoreApp,Version=v1.0 (osx.10.11-x64).

gregg-miskelly commented 8 years ago

@HawkenKing are you trying to do .NET Core debugging? If not, you kind ignore that failure if you like, though we can try and help you if you are interested.

If you would like help -- please open a new bug and include your version of the C# extension and your version of .NET CLI (dotnet --info).

DustinCampbell commented 8 years ago

@HawkenKing: Also, the "Legacy OmniSharp Support for Visual Studio Code" extension is quite old. I'd recommend uninstalling it and only using the C# extension.

HawkenKing commented 8 years ago

@DustinCampbell The above GIF was screen recorded using the C# extension, I uninstalled the legacy one a while back.

HawkenKing commented 8 years ago

@gregg-miskelly nope! VScode alerts obscure the tabs area so would be nice to know how to get rid of it though...

gregg-miskelly commented 8 years ago

@HawkenKing please open a new bug then for your debugger install issue. Please include the version of the .NET CLI which you have installed (dotnet --info).

DustinCampbell commented 8 years ago

@HawkenKing: Could you provide your OmniSharp log? You can find this by select View->Output from the menu and then choosing "OmniSharp Log" from the drop-down on the right-hand side:

image

Xelnath commented 8 years ago

[INFORMATION:OmniSharp.ScriptCs.ScriptCsProjectSystem] Detecting CSX files in '/Users/alexanderbrazie/project-sidescroller'. [INFORMATION:OmniSharp.ScriptCs.ScriptCsProjectSystem] Could not find any CSX files [INFORMATION:OmniSharp.Startup] Configuration finished.

object [INFORMATION:OmniSharp.Middleware.LoggingMiddleware] /autocomplete: 500 56ms [INFORMATION:OmniSharp.Middleware.LoggingMiddleware] /v2/getcodeactions: 200 13ms [INFORMATION:OmniSharp.Middleware.LoggingMiddleware] /v2/getcodeactions: 200 204ms [INFORMATION:OmniSharp.Middleware.LoggingMiddleware] /v2/getcodeactions: 200 331ms [INFORMATION:OmniSharp.Middleware.LoggingMiddleware] /v2/getcodeactions: 200 626ms [INFORMATION:OmniSharp.Middleware.LoggingMiddleware] /v2/getcodeactions: 200 210ms [INFORMATION:OmniSharp.Middleware.LoggingMiddleware] /v2/getcodeactions: 200 364ms [INFORMATION:OmniSharp.Middleware.LoggingMiddleware] /v2/getcodeactions: 200 178ms [INFORMATION:OmniSharp.Middleware.LoggingMiddleware] /v2/getcodeactions: 200 212ms [ERROR:Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware] An unhandled exception has occurred: Object reference not set to an instance of an object [INFORMATION:OmniSharp.Middleware.LoggingMiddleware] /autocomplete: 500 15ms [ERROR:Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware] An unhandled exception has occurred: Object reference not set to an instance of an object [INFORMATION:OmniSharp.Middleware.LoggingMiddleware] /autocomplete: 500 15ms [ERROR:Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware] An unhandled exception has occurred: Object reference not set to an instance of an object [INFORMATION:OmniSharp.Middleware.LoggingMiddleware] /autocomplete: 500 15ms [ERROR:Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware] An unhandled exception has occurred: Object reference not set to an instance of an object [INFORMATION:OmniSharp.Middleware.LoggingMiddleware] /autocomplete: 500 19ms [ERROR:Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware] An unhandled exception has occurred: Object reference not set to an instance of an object [INFORMATION:OmniSharp.Middleware.LoggingMiddleware] /autocomplete: 500 11ms [INFORMATION:OmniSharp.Middleware.LoggingMiddleware] /v2/getcodeactions: 200 8ms [INFORMATION:OmniSharp.Middleware.LoggingMiddleware] /v2/getcodeactions: 200 378ms

Xelnath commented 8 years ago

This happens when I try to mouse-over or inspect class or instance variables.

DustinCampbell commented 8 years ago

I believe that all of these issues should be addressed in the latest release of the extension (1.5.2).