在Mac的Visual Studio代码中找不到类型或名称空间名称“系统”

问题描述

在通过VSCode Omnisharp的“源代码控制”区域意外删除了项目之后,它完全停止工作。任何先前的项目和任何新创建的项目均无效。一切在Visual Studio上都可以正常运行,因此我认为问题不在于.NET Core安装。我在Mac上。

enter image description here

    "message": "The type or namespace name 'System' Could not be found (are you missing a using directive or an assembly reference?) [API,API,API]"

我尝试过的事情:

  • 重新安装.Net Core 3.1(无需先将其卸载)
  • 完全删除VSCode(包括隐藏的目录,缓存,所有内容
  • 在网络上找到更简单的解决方案,例如重建,重新启动omnisharp等。

感谢您的帮助,谢谢!

解决方法

遵循这些steps可以帮助我解决问题:

 * Go to the VSCode settings (File > Preferences > Settings).
 * Search with the keywords omnisharp use global mono to locate the configuration.
 * Change the value to never from either auto or always.
 * REMEMBER to restart the VSCode to activate the change (I restarted it twice to be sure).