.Net Framework 4.6.2 not in Visual Studio 2017

Cannot find the .NET Framework 4.6.2 in Visual Studio 2017?  Without it you cannot get all the cool new C# features?

When you create a new project for example, you may only see .NET Framework versions up to 4.6.1 as seen in Figure 1.


Figure 1, where is 4.6.2 in Visual Studio 2017

This is easily resolved by installing the .NET Framework 4.6.2 Developer Pack from herehttps://www.microsoft.com/net/targeting

Once installed you will see the desired version and you can use all those new C# 7 features, rock!  See Figure 2 which I have after installing the .NET Framework 4.6.2 Developer Pack.


Figure 2, where is 4.6.2 in Visual Studio 2017, download and install 4.6.2

I am certain this will be included in an up and coming update, until, just manually install it.

I was also getting "Predefined type 'System.ValueTuple'2' is not defined or imported" when I was working with the new C# 7 Tuple feature, like Figure 3.


Figure 3, C# 7 tuple, System.ValueTuple is not defined or imported

I fixed this by manually installing the System.ValueTuple NuGet package, Figure 4.


Figure 4, C# 7 tuple, System.ValueTuple is not defined or imported


Comments (10)
  1. ErikEJ says:

    4.6.2 is an optional component during VS 2017 installation!

  2. Blake Niemyjski says:

    This should have been selected by default

    1. Dirk_Strauss says:

      I agree with Blake. This probably should have been selected by default.

  3. in setup, simply select .net 4.6.2. Because .net standard 2.0 will use 4.6.1, 4.6.2 is not enabled by default, only 4.6.1

  4. Philmatic says:

    It doesn’t matter if you select it as an optional component during the install, it silently fails because it for some strange reason requires Windows 10 1607 instead of 1511 (RTM).

    From the dd_setup log. Marking package Microsoft.Net.4.6.2.TargetingPack as not applicable due to reasons: The current OS Version ‘10.0.10586.0’ is not in the supported version range ‘10.0.14393’.

    1. Mike says:

      Windows 10 1607 is also “RTM”.
      If you develop for Windows you should be using the last version of Windows (July 2016) and not an old version from late 2015 (We are in 2017 !)

      1. Ed says:

        Unless you maintain software for customers who won’t upgrade and are still running Win7

  5. Rich Newman says:

    Most C# 7.0 features are I think available in VS2017 with the default 4.6.1 .Net framework: the very nice out variables, pattern matching, local functions, output refs and arrows for constructors and all seem to work fine. In fact since these are compiler constructs in Visual Studio 2017 you can use them with any earlier version of the framework if you upgrade to VS2017. I think the ONLY thing from that list of new features that doesn’t work is tuples and the associated deconstruction stuff, and support for these can be installed via a NuGet package (search for System.ValueTuple). This works in earlier versions of the framework too. So I don’t think you really need to use a later framework version just to get these features.

  6. If you install .Net 4.7, you will also encounter the same problem. At this time you must first remove .Net 4.7 to install .Net 4.6.2.

  7. Abhijit Vyas says:

    In my case when i downloaded the 4.6.2 developer pack and tried installing it . it showed me the repair /uninstall dialog. once i did repair all worked fine !

Comments are closed.

Skip to main content