3

after opening the C# project I get

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

does anyone have a solution? thanks in advance

Jival pal
  • 31
  • 1
  • 2

3 Answers3

4

Close Visual Studio. In Unity go to Edit < Preferences < External Tools And make sure External Script Editor is Visual Studio so that additional checkboxes appear.

Make sure Generate all csproj files is checked, and Editor Attaching is checked

On MacOS: Check all checboxes. Click "Regenerate project files".

You may need to close and reopen Visual Studio.

rofrol
  • 14,438
  • 7
  • 79
  • 77
Vasil3
  • 100
  • 7
1

For all the people that are using newer versions of vs code and don't find the above settings, here's what you need to do:

  1. Uncheck "Omnisharp: Use modern .NET"
  2. A popup should appear in vs code to download mono (if it dosn't, download it manually from [https://www.mono-project.com/download/stable/][1]
  3. restart Visual Studio Code (Cmd + Q and then re-open)
0

I solved this issue by doing the following on VSCode:

  • Go to settings. (Code -> Preferences -> Settings on Mac)
  • Search "omnisharp".
  • Find the section "Omnisharp: Use Global Mono," and set it to "always."
  • Find the section "Omnisharp: Path," and click "Edit in settings.json."
  • Change "omnisharp.path" as "omnisharp.path": latest".
  • Reload the window.

Original answer is here: https://stackoverflow.com/a/63603883/9337700

Akhrorjon
  • 136
  • 9