What's the difference between the .NET Framework SDK and the Targeting pack

.NetVisual Studio

.Net Problem Overview


I'm trying to install the .NET Framework 4.7.1 in Visual Studio and I'm given the choice to install:

  • .NET Framework 4.7.1 SDK
  • .NET Framework 4.7.1 targeting pack

Do I need them both? What's the difference between each of them?

.Net Solutions


Solution 1 - .Net

The .NET Framework SDK, is a software development kit (SDK) from Microsoft.

It is required to develop applications for the .NET Framework and it contains:

  • documentation
  • header files
  • libraries
  • Samples and tools.

.NET Framework SDK is dedicated to developing applications for .NET Framework. When installing visual studio, this is enough.

Targeting pack is needed when You are targeting a particular .NET framework which is different from your currently installed .NET framework.

In the case of the targeting pack, let's say you build your application using .NET 4.7 but the client has .NET 4.5. For this type of scenario you can target the client's version even though you are using a higher version.

Here you can see how to target a particular .NET framework.

Solution 2 - .Net

Here is the difference, according to

docs.microsoft.com

A targeting pack: lets your app target a specific version of the .NET Framework when developing in Visual Studio and some other development environments.

A developer pack: includes a specific version of the .NET Framework and its accompanying SDK along with its corresponding targeting pack.

In other words, for example: SDK 4.7.1 includes .NetFramework 4.7.1 and target pack 4.7.1. But if you want to target .Net Framework 4.6, you need to install the target pack 4.6

Solution 3 - .Net

Wondered the same!. It looks like targeting packs are mainly to install reference assemblies(assemblies with no implementation) for that particular .net version, to just let IDE/Build tools compile.

I couldn't find much information on what exactly SDK comprises of, but I think its just bunch of tools plus some other stuff(the download size is consistently ~30mb across all .net versions)

some useful links -

https://stackoverflow.com/questions/29303219/was-the-developer-pack-originally-called-sdk

https://stackoverflow.com/questions/43420178/can-i-use-visual-studio-2015-to-target-net-framework-4-7

https://docs.microsoft.com/en-us/dotnet/standard/assembly/reference-assemblies

On a side note: Developer pack = SDK + Targeting pack.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionAlessandro CifaniView Question on Stackoverflow
Solution 1 - .NetTharushi GeethmaView Answer on Stackoverflow
Solution 2 - .Netandreyk2 HohlovView Answer on Stackoverflow
Solution 3 - .NetNagarjuna BorraView Answer on Stackoverflow