Can't compile project - VB.Net - Fatal error BC2000 - Xamarin/MonoDevelop

我的梦境 提交于 2020-01-06 01:55:16

问题


Just downloaded Xamarin/MonoDevelop in order to create a VB.Net based cross-platform application.

However Xamarin keeps returning a fatal error when attempting to compile a default template.

Steps:

  1. File > New > Solution

  2. VBNet > Gtk# 2.0 Project

  3. Name solution

  4. Click Play (Debug)

Results:

Error Fatal error BC2000 : compiler initialization failed unexpectedly: Project already has a reference to assembly System. A second reference to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\System.dll' cannot be added. (Fatal error BC2000 ) (test111)

The above occurs if I click Play, Build, Run/Start Without Debugging, and Run/Start With Debugging.

The above does not occur with a C# Gtk# 2.0 project.

There is only one reference to System within the References folder in the Solution tree.

Any help would be greatly appreciated!

Thanks.


回答1:


It seems that you can work around this bug if you install Mono and set it as your runtime (Project / Active Runtime menu), then it will build and run successfully.



来源:https://stackoverflow.com/questions/16346189/cant-compile-project-vb-net-fatal-error-bc2000-xamarin-monodevelop

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