Reference Assemblies for Framework ".Netframework,Version=V4.7.1" Were Not Found

Reference assemblies for framework .NETFramework,Version=v4.7.1 were not found

I had the same issue but on OSX. Installing latest version of Mono cleared up the missing .net v4.7.1 framework references.

I installed Mono V5.18.0 from https://www.mono-project.com/download/stable

Update: See comment below regarding global omnisharp setting

Cannot reference the .NetFramework when opening script in the Unity, VScode

I've found the solution for this. Due to the default setting for the Unity to target the dotNet Framework version is 4.7.2, just change it to the version which is using now. For example, my framework version is 4.8.

Therefore, at the left toolbar in the VScode, there is a file called Assembly-CSharp.csproj when you open the script from the Unity. Click into the file and find the <TargetFrameworkVersion>. You'll see the default version 4.7.2. Then, change to the version you're using. That's all. Another of doing it is installing the version 4.7.2.

Note this is an issue after I installed all the necessary programs.

  1. Mono https://www.mono-project.com/download/stable/
  2. DOTNET framework and core SDK https://dotnet.microsoft.com/download
  3. Extension for C# and the Unity https://code.visualstudio.com/docs/other/unity

EDIT
If the series of problems cannot be solved using VSCode, I would suggest using Visual Studio. It's all packed without any bugs.

How should I fix/resolve exception The reference assemblies for framework .NETFramework,Version=v4.6.1 were not found?

Either select "Download the targeting pack for..." from the dialog, or open the Visual Studio Installer, click "Modify" and select the 4.6.1 targeting pack from "Individual components":

Csharp Sample Image 8

VSCode Unity OmniSharp .NETFramework not found

Install latest stable Mono Version should fix the issue for this one, if anyone faces a similar issue.

Or try a different one until it is resolved, might be some mono versions preventing this.

Visual Studio Code .NET framework not working when launched through unity

The answer is in the log:

[fail]: OmniSharp.MSBuild.ProjectLoader 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 [warn]:
OmniSharp.MSBuild.ProjectManager Failed to load project file
'a:\Github\Unity\2_Terminal_Hacker\Assembly-CSharp.csproj'.
a:\Github\Unity\2_Terminal_Hacker\Assembly-CSharp.csproj A:\Program
Files\Microsoft Visual
Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1177,5):
Error: 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

.Net sdk/system libraries are installed through Visual Studio, so vscode/omnisharp tried to pull them from your Visual Studio Community 16.6 installation (info for that is on the start of the log). But it looks like VSCommunity is installed without v4.7.1 targetting pack.

To fix this, go to:

Visual Studio Installer -> Visual Studio Community -> More -> Modify ->
Individual Components

and check ".NETFramework v4.7.1" pack. Afrer this gets installed, reboot stuff and you should be good to go.

error MSB3644: The reference assemblies for framework .NETFramework,Version=v4.5 were not found

Meanwhile I've solved the issue, and it comes down to a general truth in working with computers:

When you have a problem, don't listen to what your computer tells you, but ask yourself what you were doing when the problem arose.

In my case, it means the following:

The problem popped up when I had upgraded my Visual Studio version (using the Visual Studio Installer), so the solution consisted of starting that Visual Studio Installer again, and check some more features to be installed (I've now checked so many of them that I can't figure out which one exactly solved my problem).

The error message, preceeded by the dialog box, were just information about the PC internals which only led to ununderstandable sidetracks.



Related Topics



Leave a reply



Submit