Visual Studio 2013 和 .NET 4.6
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/31836046/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Visual Studio 2013 and .NET 4.6
提问by Konrad Viltersten
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 pagewhere I selected VS2013, clicked on .NET 4.6 and downloaded the softwarebut 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.
我正在尝试为我的项目和设置设置 4.6 .NET 框架,因为它没有列出,我选择了最后一个选项 - 安装更多框架。这将我定向到一个页面,我选择了 VS2013,单击 .NET 4.6 并下载了软件,但尽管安装成功并重新启动了计算机,但我仍然没有在可用选项列表中看到 4.6 .NET .
I've googled around for it and found mentionedthat 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).
我已经搜索了它,发现提到4.6 在 Win 8.1(这是我的系统)上可用。然而,它没有明确说明它可用于 VS 2013(它并没有说它不是,但也不是)。
It's being said that .NET 4.6 is includedin VS 2015 but I'm not clear if it's availablefor VS 2013. Is it? And how to get it to work?
据说 .NET 4.6包含在 VS 2015 中,但我不清楚它是否可用于 VS 2013。是吗?以及如何让它工作?
Edit
编辑
After having installed the TP (a.k.a. Targeting Pack), I still get nothing new in the options, as the image depicts. Suggestions?
安装 TP(又名 Targeting Pack)后,我仍然没有看到任何新的选项,如图所示。建议?
采纳答案by jerhewet
By putting together various pieces from the previous answers I was finally able to get a matching .Net Framework 4.6 andthe Targeting Pack for it, and once both were installed the v4.6 Framework shows up as an available target framework Visual Studio 2012.
通过将先前答案中的各个部分放在一起,我终于能够获得匹配的 .Net Framework 4.6和它的 Targeting Pack,并且一旦安装了两者,v4.6 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.
我从http://www.microsoft.com/en-us/download/details.aspx?id=48130下载了 Framework 4.6 的独立安装程序 (NDP46-KB3045557-x86-x64-AllOS-ENU.exe)并安装它首先。
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.
然后我从https://www.visualstudio.com/downloads/download-visual-studio-vs下载并安装了 Visual Studio 2015 Professional ISO 的 ISO ,浏览到 netfx_46mtpack 子目录,并安装了 netfx_46mtpack.msi。
回答by Brandon
You need to install the .NET Framework 4.6 Targeting Pack.
您需要安装.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.
.NET Framework 4.6 Targeting Pack 是一个包,使开发人员能够使用 Visual Studio 2013、Visual Studio 2012 或第三方 IDE 构建面向 .NET Framework 4.6 的应用程序。在安装目标包之前,您需要下载并安装 .NET Framework 4.6。
回答by Gerrit
Referring to this support article by Microsoft:
Microsoft .NET Framework 4.6 Targeting Pack and Language Packs for Windows
参考 Microsoft 的这篇支持文章:
Microsoft .NET Framework 4.6 Targeting Pack and Language Packs for Windows
In short you need three components:
简而言之,您需要三个组件:
- The .Net 4.6 Framework itself of course
- The .NET Framework 4.6 Targeting Pack
- language neutral reference assemblies to compile against
- download file name like “NDP46-TargetingPack-KB3045566.exe”
- optional: The .NET Framework 4.6 Targeting Pack Language Packs
- translated IntelliSense help files
- download file name like “NDP46-TargetingPack-KB3045566-ENU.exe”
(suffix -ENUfor english, -DEUfor german etc.)
- .Net 4.6 框架本身当然
- .NET Framework 4.6 目标包
- 要编译的语言中性参考程序集
- 下载文件名,如“NDP46-TargetingPack-KB3045566.exe”
- 可选:.NET Framework 4.6 目标包语言包
- 翻译的 IntelliSense 帮助文件
- 下载文件名,如“NDP46-TargetingPack-KB3045566-CHS.exe程序”
(后缀-ENU英语,-DEU德国等)
回答by Mika Karjunen
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
我在 Visual Studio 2012 和 .NET 4.6 中遇到了同样的问题。我已经安装了来自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.
我在先安装目标包然后安装运行时犯了一个错误。安装运行时后我重新安装了目标包,瞧,它还活着!Brandon 提到的解决方案是正确的。
回答by Florin D. Preda
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
最简单的解决方案是安装 Visual Studio 2015 Community Edition。不优雅,但它会自动解决所有依赖项。安装后,您可以使用带有 .NET 4.6 的 Visual Studio 2013
回答by Gabriel Marius Popescu
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!
我按照此处介绍的步骤操作,但 Visual Studio 未在项目属性目标框架列表中显示 .NET Framework 4.6.2。我必须下载 NDP462-DevPack-KB3151934-ENU 才能添加到列表中。您可以从Microsoft 下载中心下载它。希望能帮助到你!
回答by SBI
回答by zchpit
Just download SDK for .net framework developer pack, that you need (it worked for me):
只需下载您需要的适用于 .net 框架开发人员包的 SDK(它对我有用):
https://www.microsoft.com/net/targeting
https://www.microsoft.com/net/targeting
(In my sytuation it was .NET Framework 4.6.2 Developer Pack )
(在我看来,它是 .NET Framework 4.6.2 Developer Pack )
回答by Oliamster
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.
为了完整回答@jerhewet 的回答,请下载最新的 Visual Studio 安装程序:vs_community(2017)。而在正常安装过程中,您需要选择所有需要的工作负载,此处取消选中除
.NET Framework 4.6 Targeting Pack. 等待安装过程完成,然后关闭安装程序。
In this way, you don't even need to install a standalone .NET 4.6.
这样,您甚至不需要安装独立的 .NET 4.6。


