“Cannot start Omnisharp because Mono version >=3.10.0 is required”

半世苍凉 提交于 2020-01-11 04:23:05

问题


I just installed Visual Studio Code and when I started it, it gives me this error. When I try to execute my example application, it gives me TypeLoadExceptions.

Cannot start Omnisharp because Mono version >=3.10.0 is required


回答1:


When you installed it, you probably used

sudo apt-get install mono-complete

In my case, this installed Mono 3.2.8 which is evidently lower than 3.10.0. I couldn't manage to upgrade my Mono installation to a more recent version until I found this workaround:

sudo apt-get install mono-devel

This will install the developer package which, as of yesterday, comes with Mono 4.0.1. This will replace your existing Mono 3.2.8 installation with the newest version and when you restart VS Code, you'll notice that the error is gone and everything seems to work perfectly. Likewise, executing a program will also no longer have TypeLoadExceptions.

I blogged about this in more detail here.




回答2:


I still can't update my mono version using sudo apt-get install mono-devel until I follow the official website.

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
sudo apt-get update


来源:https://stackoverflow.com/questions/29991543/cannot-start-omnisharp-because-mono-version-3-10-0-is-required

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!