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
.
我刚刚安装了Visual Studio Code,当我启动它时,它给了我这个错误。当我尝试执行我的示例应用程序时,它给了我TypeLoadExceptions。
Cannot start Omnisharp because Mono version >=3.10.0 is required
无法启动Omnisharp,因为需要Mono版本> = 3.10.0
2 个解决方案
#1
12
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:
在我的例子中,这安装了Mono 3.2.8,显然低于3.10.0。在找到此解决方法之前,我无法将Mono安装升级到更新版本:
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
.
这将安装开发人员包,截至昨天,它配备了Mono 4.0.1。这将用最新版本替换您现有的Mono 3.2.8安装,当您重新启动VS Code时,您会注意到错误已经消失,一切似乎都完美无缺。同样,执行程序也将不再具有TypeLoadExceptions。
I blogged about this in more detail here.
我在这里更详细地写了这篇博文。
#2
1
I still can't update my mono version using sudo apt-get install mono-devel
until I follow the official website.
我仍然无法使用sudo apt-get install mono-devel更新我的单声道版本,直到我关注官方网站。
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
#1
12
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:
在我的例子中,这安装了Mono 3.2.8,显然低于3.10.0。在找到此解决方法之前,我无法将Mono安装升级到更新版本:
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
.
这将安装开发人员包,截至昨天,它配备了Mono 4.0.1。这将用最新版本替换您现有的Mono 3.2.8安装,当您重新启动VS Code时,您会注意到错误已经消失,一切似乎都完美无缺。同样,执行程序也将不再具有TypeLoadExceptions。
I blogged about this in more detail here.
我在这里更详细地写了这篇博文。
#2
1
I still can't update my mono version using sudo apt-get install mono-devel
until I follow the official website.
我仍然无法使用sudo apt-get install mono-devel更新我的单声道版本,直到我关注官方网站。
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