C# 在Mac的Visual Studio代码中找不到类型或命名空间名称“System”

C# 在Mac的Visual Studio代码中找不到类型或命名空间名称“System”,c#,.net,.net-core,visual-studio-code,omnisharp,C#,.net,.net Core,Visual Studio Code,Omnisharp,在通过VSCode的源代码管理区域意外删除项目后,Omnisharp完全停止工作。任何以前的项目和任何新创建的项目都不起作用。在VisualStudio上一切正常,所以我认为问题不在于.NETCore的安装。我在Mac电脑上 我所尝试的: 在不首先卸载的情况下重新安装.Net Core 3.1 完全删除VSCode,包括隐藏目录、缓存和所有内容 在web上可以找到更简单的解决方案,如重建、重新启动omnisharp等。 感谢您的帮助,谢谢 以下这些帮助我解决了这个问题: * Go to the

在通过VSCode的源代码管理区域意外删除项目后,Omnisharp完全停止工作。任何以前的项目和任何新创建的项目都不起作用。在VisualStudio上一切正常,所以我认为问题不在于.NETCore的安装。我在Mac电脑上

我所尝试的:

在不首先卸载的情况下重新安装.Net Core 3.1 完全删除VSCode,包括隐藏目录、缓存和所有内容 在web上可以找到更简单的解决方案,如重建、重新启动omnisharp等。 感谢您的帮助,谢谢

以下这些帮助我解决了这个问题:

 * 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).
以下这些帮助我解决了这个问题:

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

核心库是单个库,而在Net中,每个库都有自己的名称空间dll。如果您进入VS:solutionexplorer并查看引用下的库,它们应该始终与模块顶部的using语句相同。您将在引用系统中看到的核心项目。核心和using语句应该相同。@jdweng我不确定这是否有帮助,因为该项目在Visual Studio上运行良好,但在Visual Studio上运行不正常。请阅读以下代码:@jdweng如果是程序集问题,为什么在Visual Studio上运行?:这些库在您称之为VS的Net和Core中的打包方式不同。这些库是dll,您在核心应用程序中使用的dll与在网络应用程序中使用的dll不同。核心库是单个库,而在网络中,每个库都有自己的命名空间dll。如果您进入VS:solutionexplorer并查看引用下的库,它们应该始终与模块顶部的using语句相同。您将在引用系统中看到的核心项目。核心和using语句应该相同。@jdweng我不确定这是否有帮助,因为该项目在Visual Studio上运行良好,但在Visual Studio上运行不正常。请阅读以下代码:@jdweng如果是程序集问题,为什么在Visual Studio上运行?:这些库在您称之为VS的Net和Core中的打包方式不同。这些库是dll,您在核心应用程序中使用的dll与在网络应用程序中使用的dll不同。