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

user1196715 picture user1196715 · Apr 2, 2019 · Viewed 16.5k times · Source

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.

Answer

Lennart picture Lennart · Apr 2, 2019

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