首页 > 解决方案 > 在 Visual Studio Code for Mac 上找不到类型或命名空间名称“系统”

问题描述

在通过 VSCode Omnisharp 的源代码控制区域意外删除项目后完全停止工作。任何以前的项目和任何新创建的项目都没有任何作用。在 Visual Studio 上一切正常,所以我认为问题不在于 .NET Core 安装。我在 Mac 上。

在此处输入图像描述

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

我试过的:

任何帮助表示赞赏,谢谢!

标签: c#.net.net-corevisual-studio-codeomnisharp

解决方案


遵循这些步骤帮助我解决了这个问题:

 * 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).

推荐阅读