Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

[VS Code] Error: The reference assemblies for framework ".NETFramework,Version=v4.7.1" were not foun

Discussion in 'External Tools' started by BenoitFreslon, Jul 7, 2019.

  1. BenoitFreslon

    BenoitFreslon

    Joined:
    Jan 16, 2013
    Posts:
    133
    Hello,

    I want to use VS Code Mac. I just followed the installation tutorial but I got this issue with Unity 2018.3.14f1 and VS Code 1.36

    Code (CSharp):
    1. Microsoft.Common.CurrentVersion.targets(1195,5): Error: The reference assemblies for framework ".NETFramework,Version=v4.7.1" 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.
     
  2. liviu_vasut

    liviu_vasut

    Joined:
    Oct 2, 2019
    Posts:
    2
    Same problem with Unity 2019.1.0f2 on Linux (Fedora) and VS Code 1.38. Any tips? Where should we look?
    I'm new to the C# ecosystem so I might interpret this the wrong way. I have installed dotnet-sdk-3.0, which is the latest version on their site (https://dotnet.microsoft.com/download). The error message also mentions .NETFramework but the download page does not have it for Linux, or Mac for that matter.
    Apart from that error, auto-completion doesn't work for Unity related classes, might be for the same reason.
     
  3. liviu_vasut

    liviu_vasut

    Joined:
    Oct 2, 2019
    Posts:
    2
    I managed to fix it by installing mono. See this comment https://forum.unity.com/threads/setup-visual-studio-code-on-linux.695509/#post-4944119
    The project still failed, but with another error:
    Code (CSharp):
    1. Unable to create directory "/Debug/". Access to the path "/Debug/" is denied
    I could not figure where this path was defined but I assumed that it actually tries to write in the root of the filesystem. So I manually created /Debug and did a chmod a+rw on it. Now everything works fine.