Visual Studio 2013 and .NET 4.6
Asked Answered
S

9

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

Skiagraph answered 5/8, 2015 at 14:58 Comment(0)
S
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.

Stockist answered 6/9, 2015 at 15:4 Comment(7)
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...Skiagraph
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.Stockist
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...Skiagraph
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!Sinclare
@Stockist 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.Yesterday
@Gemit answer is more concise and accurate. This answer lacks essential details. See Gemit's answer here,Coker
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 ?Annabellannabella
M
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.

Millican answered 5/8, 2015 at 15:2 Comment(12)
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...Skiagraph
Also - what was that thing that I did install in the first place, then?!Skiagraph
@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.Millican
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.Skiagraph
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.Heins
@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.Millican
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.Stockist
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 workedCoker
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.Christiansand
It's now 2017 and I started by installing ASP.NET 4.6.2 then the targeting pack 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."Grandmamma
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.Grandmamma
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.Antiserum
M
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.)
Mattison answered 25/9, 2015 at 8:54 Comment(4)
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.Tidy
Except the difference between the .exe and .ENU.exe do we need both or just one or other?Coker
@Coker The explanation is somewhat hidden under the Download -> Details pane. I have updated my answer above.Mattison
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.Coker
O
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.

Overmantel answered 12/8, 2015 at 11:51 Comment(2)
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).Stockist
Developer pack installs runtime, targeting pack and SDK. There is no need to install runtime separately.Miff
A
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

Arioso answered 28/9, 2015 at 14:7 Comment(1)
Too heavy and installing/uninstalling is not approaching the solution in a straight line.Christiansand
H
2

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

Heins answered 5/8, 2015 at 15:2 Comment(4)
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...Skiagraph
ENU stands for "English, United States", which means it's only packed with english, whereas the first one is international.Heins
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!)... +1Skiagraph
It didn't really seem to have worked out... Take a look at the edit. Maybe I'm missing something...Skiagraph
D
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!

Demonology answered 8/3, 2017 at 17:15 Comment(0)
N
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 )

Nietzsche answered 8/5, 2017 at 15:20 Comment(0)
S
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.

Sibling answered 23/7, 2018 at 20:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.