Can't start Omnisharp because of mono version

后端 未结 8 961
春和景丽
春和景丽 2021-01-11 10:11

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

<
8条回答
  •  情歌与酒
    2021-01-11 10:43

    I had the same problem. In /Library/Frameworks/Mono.Framework/Versions I had three different mono versions 2.10.9, 3.12.1 and 4.0.0 with 4.0.0 being the 'Current'.

    Yet the mono version on my command line path was 2.10.9.

    $ which mono
    /opt/local/bin/mono
    

    For me the fix was to remove the mono version I had installed ages ago in Macports (the bin files for Macports are stored in /opt/local/bin).

    $ sudo port uninstall mono
    --->  Deactivating mono @2.10.9_0
    --->  Cleaning mono
    --->  Uninstalling mono @2.10.9_0
    --->  Cleaning mono
    

    After doing that new and 'Current' mono from /usr/bin/mono on my Mac was picked up and Visual Studio Code could load my sln files and use Omnisharp - yay :)

    $ mono --version 
    Mono JIT compiler version 4.0.0 ((detached/d136b79 Mon Apr 13 14:40:59 EDT 2015)
    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-(detached/a173357)
        GC:            sgen
    

提交回复
热议问题