微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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

如何解决在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).

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。