58

I'm trying to set the 4.6 .NET framework for my project and in the settings, as it wasn't listed, I chose the last option - to install more frameworks. That directed me to a page where I selected VS2013, clicked on .NET 4.6 and downloaded the software but despite the installation being successful and restart of the computer, I still don't get to see the 4.6 .NET in the list of available options.

I've googled around for it and found mentioned that 4.6 is available on Win 8.1 (which is my system). However it doesn't say explicitly that it's available for VS 2013 (it doesn't say that it isn't, neither, though).

It's being said that .NET 4.6 is included in VS 2015 but I'm not clear if it's available for VS 2013. Is it? And how to get it to work?

Edit

After having installed the TP (a.k.a. Targeting Pack), I still get nothing new in the options, as the image depicts. Suggestions?

enter image description here

Community
  • 1
  • 1
Konrad Viltersten
  • 36,151
  • 76
  • 250
  • 438

9 Answers9

52

By putting together various pieces from the previous answers I was finally able to get a matching .Net Framework 4.6 and the Targeting Pack for it, and once both were installed the v4.6 Framework shows up as an available target framework Visual Studio 2012.

I downloaded the standalone installer for Framework 4.6 (NDP46-KB3045557-x86-x64-AllOS-ENU.exe) from http://www.microsoft.com/en-us/download/details.aspx?id=48130, and installed it first.

Then I downloaded and mounted the ISO for Visual Studio 2015 Professional ISO from https://www.visualstudio.com/downloads/download-visual-studio-vs, browsed to the netfx_46mtpack subdirectory, and installed netfx_46mtpack.msi.

The end result is a matching pair of versions for Framework 4.6 and the Targeting pack

And the Target framework shows up as a build target.

jerhewet
  • 1,186
  • 1
  • 10
  • 19
  • 6
    You have **waaay** too much spare time on your hand. And for that, +1 to you. I'll give it a try as soon as I get to a computer. My solution this far is much more pragmatical. I went with .NET 4.5... – Konrad Viltersten Sep 06 '15 at 15:31
  • If it were up to me I'd still be using VS2010, but all of the developers are migrating the codebase to Framework 4.6, so it was either figure out how to get Framework 4.6 to work with VS2012 or install VS2015 and live with all of the truely horrid and awful "features" they've added to it.There are now all sorts of incredibly annoying "analysis" tools they've jammed into VS2015 without giving developers a way to opt-out. – jerhewet Sep 06 '15 at 16:58
  • Seriously? I've seen the bars jumping back and forth on people's screens but I thought it was something they added as third party tools or at least checked in for... – Konrad Viltersten Sep 06 '15 at 18:07
  • def +1 for the effort :) However I simply followed @Brandon's answer below and that worked for me. Took no more than 15 mins in total. Thank god for stack overflow! – JohanLarsson Nov 19 '15 at 08:32
  • @jerhewet be careful even though you have .NET 4.6 framework in 2012 you do not have C# 6 features. It likely if some devs are on 2015 and some are on 2012 then the people on 2012 will start getting compile errors when the people on 2015 start using C# 6 features. – Aaron Stainback Nov 19 '15 at 15:30
  • @Gemit answer is more concise and accurate. This answer lacks essential details. See Gemit's answer here, – sdjuan Apr 27 '16 at 02:16
  • I guess in a sense is it that the `.NET 4.6.1 Framework` proper is just the run-time whereas the `.NET 4.6.1 Targeting Pack` is to actually build/target .NET 4.6.1 ? – Don Cheadle Apr 27 '16 at 22:29
44

You need to install the .NET Framework 4.6 Targeting Pack.

The .NET Framework 4.6 Targeting Pack is a package that enables developers to build applications targeting the .NET Framework 4.6 using either Visual Studio 2013, Visual Studio 2012 or third party IDEs. You need to download and install the .NET Framework 4.6 prior to installing the targeting pack.

Brandon
  • 68,708
  • 30
  • 194
  • 223
  • 1
    Is that a new nomenclature? I though "*targeting pack*" was something else than SDK (c.f. the difference between "*SDK*" and "*SRK*", i.e. "*Runtime*"). Is it now a convention to call it "*TP*" instead of "*SDK*"? Good to know... – Konrad Viltersten Aug 05 '15 at 15:06
  • Also - what was that thing that I did install in the first place, then?! – Konrad Viltersten Aug 05 '15 at 15:08
  • 1
    @KonradViltersten, I actually am not sure of that myself. For .NET Framework 4.5.2 they actually called the equivalent a "Developer Pack". The first thing you installed was actually .NET Framework 4.6, which is a prerequisite to installing the targeting pack. – Brandon Aug 05 '15 at 15:11
  • 1
    Sounds like a ass-covering hack-around to make the 4.6 appear in pre-2015 versions of Visual Studio. Well, as long as it works... You might want to add the difference between the two packages as well. The bigger one (xxx-ENU.exe) contains texts for intellisense and should in most cases be preferred. – Konrad Viltersten Aug 05 '15 at 15:12
  • As far as I understand, the .NET Framework is practically the runtime, whereas the targeting pack adds developer features. However, that's at odds with being able to compile from the command line without the targeting pack. I guess nomenclature has changed again with the new release. – SBI Aug 05 '15 at 15:12
  • @KonradViltersten, Not entirely sure why that didn't work. Which TP did you download? The one in SBI's answer or mine? SBI's link leads to the Release Candidate version, mine to the final released version. If the TP doesn't match the installed framework version, that might cause an issue. – Brandon Aug 05 '15 at 15:37
  • 1
    The version for Framework 4.6 is 4.6.00081, and the version for the Targeting Pack is 4.6.81. Yes, they don't match. Installing the framework first and the targeting pack second doesn't work. No, I can't seem to find a matching pair anywhere on the internet. – jerhewet Sep 04 '15 at 15:28
  • 1
    Already had .Net 4.6.1 installed, and just now downloaded and installed both the available packs `NDP46-TargetingPack-KB3045566.exe` and `NDP46-TargetingPack-KB3045566-ENU.exe` since they don't say if you need both or just the one. Contrary to @KonradViltersten assertion to use the ENU its not the bigger one, the download size of that is 6842KB versus 13,219 KB for the non ENU. Anyway I thought it didn't work but it was just that I needed to close down visual studio and reopen it , then it just worked – sdjuan Apr 25 '16 at 00:18
  • First, I downloaded and installed what jerhewet provided (only standalone). Restarted my computer. Secondly, I installed what Brandon provided. My VS2013 now opens my VS2015 solutions that target ASP.net 4.6/C# 6.0 successfully. – JoshYates1980 Jul 07 '16 at 15:30
  • It's now 2017 and I started by installing [ASP.NET 4.6.2](https://www.microsoft.com/en-us/download/details.aspx?id=53345) then the [targeting pack](https://www.microsoft.com/en-us/download/details.aspx?id=48136) which appears to be for 4.6.00081. Since these do not match, I get the OP's issue "I still get nothing new in the options, as the image depicts." – zacharydl Feb 09 '17 at 19:41
  • Following up on my comment above, I followed @jerhewet's answer and now 4.6 appears in VS. Note: I had to run netfx_46mtpack.msi as Administrator using Command Prompt. Just running it was creating event logs about not able to create a restore point. – zacharydl Feb 13 '17 at 23:00
  • Please note that, if you are targeting v4.6, you need to install the v4.6 targeting pack. I installed both the v4.6.2 .NET framework and the v4.6.2 targeting pack to my dev machine, and Visual Studio kept complaining about a missing .NET v4.6. Once I installed the v4.6 targeting pack, the error went away and I was able to open the project. – gog Apr 11 '19 at 12:21
15

Referring to this support article by Microsoft:
Microsoft .NET Framework 4.6 Targeting Pack and Language Packs for Windows

In short you need three components:

  1. The .Net 4.6 Framework itself of course
  2. The .NET Framework 4.6 Targeting Pack
    • language neutral reference assemblies to compile against
    • download file name like “NDP46-TargetingPack-KB3045566.exe”
  3. optional: The .NET Framework 4.6 Targeting Pack Language Packs
    • translated IntelliSense help files
    • download file name like “NDP46-TargetingPack-KB3045566-ENU.exe”
      (suffix -ENU for english, -DEU for german etc.)
Gerrit
  • 435
  • 3
  • 15
  • Download Net 4.6 Framework and then NET Framework 4.6 Targeting Pack with reference assemblies and you can open C# 4.6 solution in Visual studio 2013. – Gary Kindel Mar 02 '16 at 20:36
  • Except the difference between the .exe and .ENU.exe do we need both or just one or other? – sdjuan Apr 24 '16 at 23:45
  • 1
    @sdjuan The explanation is somewhat hidden under the Download -> Details pane. I have updated my answer above. – Gerrit Apr 25 '16 at 09:09
  • Now we are talking, that is much better. Thanks for the elucidation. This explanation shows exactly what is needed. and why. Excellent. The only part that is a bit in error is the "Everything is explained in this support article by Microsoft" since that is so not the case. Everything is explained here instead. – sdjuan Apr 27 '16 at 02:09
5

I am experiencing the very same issue with Visual Studio 2012 and .NET 4.6. I have installed both, the runtime and targetting pack from http://getdotnet.azurewebsites.net/target-dotnet-platforms.html

I made a mistake in installing first the targetting pack and then runtime. I reinstalled the targetting pack after installing the runtime and voilá, it's alive! The solution mentioned by Brandon is correct.

Mika Karjunen
  • 342
  • 4
  • 9
  • I downloaded the installers from the link above, and installed the runtime followed by the targeting pack, and it didn't work. (*very large sigh*). – jerhewet Sep 04 '15 at 15:29
  • 2
    Developer pack installs runtime, targeting pack and SDK. There is no need to install runtime separately. – zendu Oct 27 '16 at 17:22
4

The easiest solution is to install Visual Studio 2015 Community Edition. Not elegant, but it resolves all the dependencies automatically. After it's installed you can use Visual Studio 2013 with .NET 4.6

Florin D. Preda
  • 1,358
  • 1
  • 11
  • 25
2

You're looking for the .NET Targeting Pack, which you can find here.

SBI
  • 2,322
  • 1
  • 17
  • 17
  • Which should I pick? I'm getting *NDP46-TargetingPack-KB3045566.exe* of 12.9 MB and *NDP46-TargetingPack-KB3045566-ENU.exe* of 6.7 MB... – Konrad Viltersten Aug 05 '15 at 15:07
  • 3
    ENU stands for "English, United States", which means it's only packed with english, whereas the first one is international. – SBI Aug 05 '15 at 15:14
  • 1
    MS should get a reward for being vague on this one. First the confusion about the naming (TP instead of SDK) and then the ENU-thingy. One might get the impression that the other package has all the available languages (while it actually has none!)... +1 – Konrad Viltersten Aug 05 '15 at 15:16
  • It didn't really seem to have worked out... Take a look at the edit. Maybe I'm missing something... – Konrad Viltersten Aug 05 '15 at 15:32
2

I followed the steps presented here, but Visual Studio didn't display the .NET Framework 4.6.2 on the project property target framework list. I had to download NDP462-DevPack-KB3151934-ENU in order to be added on the list. You can download it from Microsoft Download Center. Hope it helps!

Gabriel Marius Popescu
  • 2,016
  • 2
  • 20
  • 22
1

Just download SDK for .net framework developer pack, that you need (it worked for me):

https://www.microsoft.com/net/targeting

(In my sytuation it was .NET Framework 4.6.2 Developer Pack )

zchpit
  • 3,071
  • 4
  • 28
  • 43
0

for the sake of completeness to what answered by @jerhewet, download the lasted Visual Studio Installer: vs_community (2017). while in the normal installation process you need to select all the needed workloads, here uncheck all but the .NET Framework 4.6 Targeting Pack. Wait for the installation process to complete and just close the installer.

enter image description here

In this way, you don't even need to install a standalone .NET 4.6.

rkta
  • 3,959
  • 7
  • 25
  • 37
Oliamster
  • 486
  • 5
  • 10