视觉工作室代码智能感知不工作(mac)

时间:2021-06-17 04:37:58

标签: macos unity3d visual-studio-code intellisense

打开 C# 项目后我得到

fail]: OmniSharp.MSBuild.ProjectManager
        Attempted to update project that is not loaded: Desktop/UNITY STUFF/action platformer/Assembly-CSharp.csproj
[fail]: OmniSharp.MSBuild.ProjectManager
        Attempted to update project that is not loaded: Desktop/UNITY STUFF/action platformer/Assembly-CSharp-Editor.csproj

有没有人有解决办法? 提前致谢

2 个答案:

答案 0 :(得分:0)

我通过在 VSCode 上执行以下操作解决了这个问题:

  • 转到设置。 (代码 -> 首选项 -> Mac 上的设置)
  • 搜索“omnisharp”。
  • 找到“Omnisharp:使用全局单声道”部分,并将其设置为 “总是。”
  • 找到“Omnisharp: Path”部分,然后点击“Edit in settings.json。”
  • 将“omnisharp.path”更改为“omnisharp.path”:latest”。
  • 重新加载窗口。

原始答案在这里:https://stackoverflow.com/a/63603883/9337700

答案 1 :(得分:0)

关闭 Visual Studio。 在 Unity 中,转到 Edit < Preferences < External Tools 并确保外部脚本编辑器是 Visual Studio 确保选中 Generate all csproj files,并选中 Editor Attaching