Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unity project w/ v1.5 of plugin non-functional (never leaves Running state) #934

Closed
mdouglass opened this issue Nov 14, 2016 · 13 comments
Closed

Comments

@mdouglass
Copy link

mdouglass commented Nov 14, 2016

Environment data

dotnet --info output:

.NET Command Line Tools (1.0.0-preview2-003131)

Product Information:
 Version:            1.0.0-preview2-003131
 Commit SHA-1 hash:  635cf40e58

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.12
 OS Platform: Darwin
 RID:         osx.10.12-x64

VS Code version: 1.7.1
C# Extension version: 1.5.1 (and 1.5)

Steps to reproduce

Just updated to the v1.5 of the plugin with my existing Unity project that uses the VSCode plugin. With that combination the C# plugin stays in the Running state forever when a project is opened and doesn't provide reference information or autocomplete support. I can't attach the project (company confidential unfortunately), but I'll attach the OmniSharp log set to verbose.

If it's helpful, I can try to create a new skeleton project and see if it continues.

omnisharp.txt

@mdouglass
Copy link
Author

Yep, seems to happen with a fresh Unity project without dotbunny/VSCode installed as well.

vscode-repro.zip

@DustinCampbell
Copy link
Member

Hmmm... it looks like you have mono installed at /usr/local/bin/mono. Is that right?

@DustinCampbell
Copy link
Member

Could you run mono --version at a Terminal window and let me know what you get?

@DustinCampbell
Copy link
Member

Also, does the following directory exist on your system?

/usr/local/lib/mono/xbuild-frameworks

@DustinCampbell
Copy link
Member

And (last question), how did you install Mono on machine. Did you install it from an official Mono release? home brew? something else?

@mdouglass
Copy link
Author

mdouglass commented Nov 14, 2016

~$ which mono
/usr/local/bin/mono
~$ mono --version
Mono JIT compiler version 4.4.1 (mono-4.4.0-branch-c7sr0/4747417 Mon Jun 20 15:43:48 EDT 2016)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
    TLS:           normal
    SIGSEGV:       altstack
    Notification:  kqueue
    Architecture:  x86
    Disabled:      none
    Misc:          softdebug 
    LLVM:          yes(3.6.0svn-mono-master/a173357)
    GC:            sgen

The directory /usr/local/lib/mono/xbuild-frameworks does not exist on my system. For that matter, /usr/local/lib/mono does not exist.

I'm not sure how the mono installation was installed on this machine, I'm guessing an official Mono release since brew doesn't seem to be aware of it. If there's a preferred installation mechanism, I'm happy to nuke the installation on this machine and redo it.

@DustinCampbell
Copy link
Member

Does the directory /Library/Frameworks/Mono.framework/ exist?

Go ahead and install the latest Mono, either from the official download here, or with Home Brew:

> brew update
> brew install mono

@mdouglass
Copy link
Author

Yes the directory /Library/Frameworks/Mono.framework/ exists, that's where /usr/local/bin/mono is symlink'd to. I'll try the uninstall/reinstall cycle now.

@DustinCampbell
Copy link
Member

before you do, could you let me know the output of readlink mono?

@mdouglass
Copy link
Author

Ok, well that seemed to make the difference (did the brew install of mono). Guess whatever older version of mono I had was problematic. Thanks for walking me through troubleshooting 101 👍

@DustinCampbell
Copy link
Member

Not a problem! Mono has changed the way it lays out on disk a few times. I'm working on making the code that locates the Mono .NET Framework reference assemblies a bit more resilient against this particular install shape.

@DustinCampbell
Copy link
Member

FYI, that I've updated the OmniSharp binaries to better locate Mono. If you want to try it (which would be another level of verification for me that I got it right!), you can force the extension to download new runtime dependencies like so:

  1. Close Visual Studio Code.
  2. Run the following commands at the Terminal window:
> rm -rf /Users/mdouglass/.vscode/extensions/ms-vscode.csharp-1.5.0/.debugger
> rm -rf /Users/mdouglass/.vscode/extensions/ms-vscode.csharp-1.5.0/bin
> rm -rf /Users/mdouglass/.vscode/extensions/ms-vscode.csharp-1.5.0/install.lock

Then, restart Visual Studio Code, load your project and let the new dependencies download.

Of course, I totally understand if you're not willing to be a guinea pig and are happy enough to have things working. 😄

@mdouglass
Copy link
Author

Went through those steps and everything seemed to work fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants