14

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.

3
  • Which Visual Studio version did you install? Which .NET SDK versions are installed on the machine? VS 2015 came with 4.6.1 since Service Pack 1. Visual Studio 2017 includes 4.7. Are you usinge a very old Visual Studio version perhaps? Commented Apr 2, 2019 at 8:27
  • If you select the second option Visual Studio will download the correct SDK itself. If you use an old VS version like 2010 you should really really consider upgrading to a recent one - 2017 or 2019, which comes out today. Commented Apr 2, 2019 at 8:29
  • Possible duplicate of msbuild 14 doesn't work without full .net framework installation Commented Apr 2, 2019 at 8:30

3 Answers 3

30

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

Sign up to request clarification or add additional context in comments.

2 Comments

And how do I get to the Installer ? Tried to find it but could not.
In Windows search for Visual Studio Installer
12

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

10 Comments

Or, OP could just select 'Download the targeting pack for ".NETFramework, Version=v4.6.1' and download the correct target version directly from the dialog
@PanagiotisKanavos in his initial message he wrote : "Error The reference assemblies for framework ".NETFramework,Version=v4.6.1" were not found." So obviously he has to select this version :) even more obvious, he can just click download from that pop-up, but my solution is more general and a good to know one.
I tried to download from the dialog and got to this page: dotnet.microsoft.com/download/… But I have no clue what should I download there.
@user1196715 the thing you're looking for. The 4.6.1 SDK. If you simply search for 4.6.1 in that page you'll find it. What Visual Studio version are you using though? Recent versions should include this
@user1196715 just follow the steps in my initial answer
|
2

Or you can directly download the targeting pack from Microsoft's website here: https://www.microsoft.com/en-us/download/details.aspx?id=49978

You can find all kind of SDKs for both .Net Framework as well as .Net Core on the Microsoft site: https://dotnet.microsoft.com/download/visual-studio-sdks

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.