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

image

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.

image

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