.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.

image

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.

image

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.

tuple001

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.

tuple002

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

 

Comments (6)

  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

  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

Skip to main content