Open Daytae opened 3 years ago
The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
@Daytae Sorry you are running into issues. Unity relies on some .NET Full Framework reference assemblies that are not part of OmniSharp's minimal MSBuild. You will need into install the latest stable Mono for your platform. https://www.mono-project.com/download/stable/
@Daytae I should have mentioned that you will need to set "omnisharp.useGlobalMono" to "always".
@JoeRobich where should I set this? getting similar issue
I went to preferences and disabled useGlobalMono, but it still isn't working, and my mono version is 6.10
you need to set use global Mono to always, not disable it
@Daytae I should have mentioned that you will need to set "omnisharp.useGlobalMono" to "always".
@JoeRobich I can't stress enough, you should really put this in the README - you already have a section https://github.com/OmniSharp/omnisharp-vscode#note-about-using-net-core-31401-or-net-5-preview-8-sdks-on-mono-platforms but I don't think it will be clear to most developers until they really dig, what even the problem is.
My understanding after a lot of frustration is that OmniSharp pulls its own version of dotnet
in along with the extension, but that at least in my case on Mac OSX where I have installed Mono and .NET Core, in order to be able to use with Unity, I need to make sure it is using my system version of Mono and not the one omnisharp is bundling? I have to imagine there are a lot of Unity devs on Mac OSX who just got frustrated and walked away from not having auto-complete, because the error messages that show up from Omnisharp are helpful only for windows folks. For example, this call to install the Developer Pack which is available only as an .exe from MS site (https://docs.microsoft.com/en-us/dotnet/framework/install/guide-for-developers) - it is a dead-end for Mac users.
In my case, setting this global config did solve the problem and get me back to auto-complete functioning. Thank you!
Solved the problem for me as well!
For those wondering where the setting omnisharp.useGlobalMono
should be set: go to VSCode, click on Preferences > Settings, and then use the search bar to search for omnisharp.useGlobalMono
. Then you should see the dropdown and set it to always
. 😀
Environment data
VS Code version: 1.49.0 C# Extension version: 1.23.2
OmniSharp log
Steps to reproduce
Load up VS code with C# extension
Expected behavior
Unity intellisense would work
Actual behavior
C# extension doesn't work and (what I presume happens) is it messes up the unity intellisense