Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't start Omnisharp because of mono version

Whenever I start up VS Code on my Mac (Yosemite), I get the following error in VS Code

Error: Cannot start Omnisharp because Mono version >=3.10.0 is required

Any ideas? I installed dnvm using homebrew exactly like the docs said at http://docs.asp.net/en/latest/getting-started/installing-on-mac.html

like image 665
ncyankee Avatar asked Apr 30 '15 04:04

ncyankee


4 Answers

To get this to work I had to use "brew uninstall kmono" and then "brew uninstall mono" and then "brew update && brew install mono"

brew uninstall kmono
brew uninstall mono
brew update && brew install mono
like image 107
davelowe85 Avatar answered Sep 28 '22 15:09

davelowe85


If you followed the instructions at the asp.net website, then you should already have brew installed. If you don't you can install it from this website: http://brew.sh

After you have that installed open a new Terminal and run the following:

brew update && brew install mono

Then you should be good to go. I just went through these same steps myself.

like image 40
KJ6YET Avatar answered Sep 27 '22 15:09

KJ6YET


Ok, I figured it out. I had mono 4.01 installed but it wasn't linked. I did the brew update and unlink, but when I tried to install it, it says it was installed but not linked. I ran this command to link it

brew link --overwrite mono

like image 4
ncyankee Avatar answered Sep 26 '22 15:09

ncyankee


TLDR; brew update && brew unlink mono && brew install mono


Gathering those two answers was necessary to resolve this for me.

I did run the script suggested by @myke-bates from here

Which at the time of writing is:

#!/bin/sh -x

#This script removes Mono from an OS X System.  It must be run as root

rm -r /Library/Frameworks/Mono.framework

rm -r /Library/Receipts/MonoFramework-*

for dir in /usr/bin /usr/share/man/man1 /usr/share/man/man3 /usr/share/man/man5; do
   (cd ${dir};
    for i in `ls -al | grep /Library/Frameworks/Mono.framework/ | awk '{print $9}'`; do
      rm ${i}
    done);
done

The as suggested by @ky6yet I ran brew-update && brew install mono to be advised that I had to unlink mono first so in fact I had to run

brew update && brew unlink mono && brew install mono

At least in my case running the script to remove mono first wasn't necessary.

like image 3
Paul D'Ambra Avatar answered Sep 29 '22 15:09

Paul D'Ambra