简体   繁体   中英

How does .NET Framework SDK relate to available target frameworks?

After years and years of developing C#.NET I still run into new questions.

We have a legacy project and for some dark reason a colleague of mine no longer was able to open solutions in VS2017. Long story short: the solution was finally found in uninstalling all .NET frameworks and installing 4.7.1 again.

The question that struck me then is as follows. After installing ONLY the latest .NET framework, I always thought that this install would also contain all supported target frameworks up and until this version. This is not the case, as I can only choose from the following target frameworks:

  • ...
  • ...
  • 4.5
  • 4.5.1
  • 4.5.2
  • 4.6
  • 4.6.2
  • 4.7.1

This is what I have installed (targeting packs/.NET framework SDKs).

在此输入图像描述

Why is 4.6.1 missing? Why is 4.7 missing? Or the other way around looking at what I have installed. Why is there a bunch of targeting packs available while I did not install them?

Which framework versions you can target depends on which targeting packs /SDKs you have installed on the machine, not which .NET Framework versions are installed.

You can download additional packs from .NET SDKs for Visual Studio .

Frequently when a new .NET framework version becomes available, different releases are available, some of which just include the runtime and some of which include the targeting pack. So it's possible that you've been installing the latter forms generally in the past and so not aware that they're also bundled separately.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM