Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I tried to load a project I have and got this exception:

Severity Code Description Project File Line Suppression State Error The reference assemblies for framework ".NETFramework,Version=v4.6.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.

And each time I'm trying to reload the project while loading it I'm getting this window:

Error

I'm not sure what to download and where from.

And I can't change any of the project properties I'm getting error in all the properties windows.

like image 294
user1196715 Avatar asked Apr 02 '19 08:04

user1196715


2 Answers

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":

enter image description here

like image 85
Lennart Avatar answered Sep 28 '22 20:09

Lennart


Windows -> Search -> Visual Studio Installer -> Modify -> Individual Components and check the right version

like image 30
Cata Hotea Avatar answered Sep 28 '22 18:09

Cata Hotea