Omnisharp-vscode: ".NETFramework,Version=v4.6" were not found

Created on 6 Feb 2018  路  7Comments  路  Source: OmniSharp/omnisharp-vscode

Environment data

dotnet --info output:
VS Code version:
C# Extension version:1.13.1

Steps to reproduce

  1. Use unity 2017.0.0f3 create a project
  2. Open unity menu "Edit/Project Settings/Player"
  3. Chose Scripting Runtime Version to "Experimental(.NET 4.6 Equivalent)"
  4. Restart unity and create any a C# script file.
  5. Open the C# file by vscode.
  6. OmniSharp Log will output this fail:
    [fail]: OmniSharp.MSBuild.ProjectFile.ProjectFileInfo The reference assemblies for framework ".NETFramework,Version=v4.6" 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.

[warn]: OmniSharp.MSBuild.MSBuildProjectSystem Failed to load project file 'e:\Workspace\CSharpTest\Assembly-CSharp.csproj'. e:\Workspace\CSharpTest\Assembly-CSharp.csproj

Expected behavior

Actual behavior

Resolved-Duplicate Unity

Most helpful comment

I have a similar issue but running on Ubuntu 16.04. Is there a solution for VScode Linux based?

All 7 comments

This is a duplicate of #1888. You might trying downloading and installing the .NET Framework 4.6 target pack from https://www.microsoft.com/en-us/download/details.aspx?id=48136.

It's work,thank you.

excellent! Thanks for confirming.

I have a similar issue but running on Ubuntu 16.04. Is there a solution for VScode Linux based?

In Mac downloading the .NET famework solved the issue https://www.microsoft.com/net/learn/get-started/macos#macos

I have a similar issue but running on Ubuntu 16.04. Is there a solution for VScode Linux based?

Installing the latest version of Mono on Ubuntu 18.04 fixed the error "The reference assemblies for framework ".NETFramework,Version=v4.7.1" were not found." for me.

^ Also in addition to that make sure to add the PPA for mono because the default repository doesnt have the latest one.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jwbay picture jwbay  路  3Comments

gregg-miskelly picture gregg-miskelly  路  3Comments

IdeoG picture IdeoG  路  3Comments

kiminuo picture kiminuo  路  3Comments

ZeldaZocker picture ZeldaZocker  路  3Comments