Unity3D, VSCode, OS X and ‘The reference assemblies for framework “.NETFramework,Version=v3.5” were not found’ error

This happened to me in this environment:
* OS X 10.10.5
* Unity 5.6.0b7
* VSCode 1.9.1 with C# extension 1.7.0

I had this error inside of VSCode when I opened up a Unity project:

The reference assemblies for framework “.NETFramework,Version=v3.5” were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.

Also, VSCode’s code completion did not work. Even with the right version of OpenSSL:

$openssl version
OpenSSL 1.0.2k  26 Jan 2017

and dotnet:


Microsoft .NET Core Shared Framework Host

  Version  : 1.1.0
  Build    : 928f77c4bc3f49d892459992fb6e1d5542cb5e86

I found this fix here:

I had to install mono with brew

brew install mono

with that, I could run mono

$mono --version
Mono JIT compiler version 4.6.2 (Stable Sun Jan  8 00:00:20 GMT 2017)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors.
    TLS:           normal
    SIGSEGV:       altstack
    Notification:  kqueue
    Architecture:  amd64
    Disabled:      none
    Misc:          softdebug
    LLVM:          supported, not enabled.
    GC:            sgen

just to prove it is installed. VSCode’s OmniSharp acknowledged found mono and let me know in its own output window while starting up and loading the project in VSCode:

Discovered Mono file path: /usr/local/bin/mono
Resolved symbolic link for Mono file path: /usr/local/Cellar/mono/

Then my code completion worked. Yay!

  • Thanks for sharing your solution! It helped me get my code completion working too ✅

  • Excellent, that resolved my issue too. Weird that somehow the Unity, VS Code, .NET Core SDK support overlooks this critical dependency.