如何在 Visual Studio 中选择 .NET 4.5.2 作为目标框架

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/23617900/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-03 12:44:14  来源:igfitidea点击:

How to select .NET 4.5.2 as a target framework in Visual Studio

.netvisual-studio.net-4.5.2

提问by IT Hit WebDAV

I have installed .NET Framework 4.5.2on Windows 8.1. But in Visual Studio 2013 I do not see the .NET Framework 4.5.2 option (see screenshot). How do I target my project for .NET 4.5.2?

我已经在 Windows 8.1 上安装了.NET Framework 4.5.2。但在 Visual Studio 2013 中,我没有看到 .NET Framework 4.5.2 选项(见截图)。如何将我的项目定位为 .NET 4.5.2?

Enter image description here

在此处输入图片说明

回答by nemesv

You need to install the Microsoft .NET Framework 4.5.2 Developer Pack

您需要安装Microsoft .NET Framework 4.5.2 Developer Pack

This contains the following components (emphasis added by me):

这包含以下组件(我添加的重点):

  • .NET Framework 4.5.2

  • .NET Framework 4.5.2 Multi-Targeting Pack: Contains the reference assemblies needed to build apps that target the .NET Framework 4.5.2

  • .NET Framework 4.5.2 Language Packs

  • .NET Framework 4.5.2 Multi-Targeting Pack Language Packs: Contains the IntelliSense files to display help while building apps that target the .NET Framework 4.5.2 through Visual Studio and third party IDEs.

  • .NET 框架 4.5.2

  • .NET Framework 4.5.2 多目标包:包含构建面向 .NET Framework 4.5.2 的应用程序所需的参考程序集

  • .NET Framework 4.5.2 语言包

  • .NET Framework 4.5.2 多目标包语言包:包含 IntelliSense 文件,用于在通过 Visual Studio 和第三方 IDE 构建面向 .NET Framework 4.5.2 的应用程序时显示帮助。

回答by plavozont

I had the same problem. The point was that I have installed DevPack only for my language.

我有同样的问题。关键是我只为我的语言安装了 DevPack。

NDP462-DevPack-KB3151934-RUS.exe

NDP462-DevPack-KB3151934-RUS.exe

as the result the appropriate folder here

结果是这里的适当文件夹

C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework

contained only one folder "ru", while the folder 4.6.1 was full of files.

仅包含一个文件夹“ru”,而文件夹 4.6.1 则是满满的文件。

In the end, installing

最后,安装

NDP462-DevPack-KB3151934-ENU.exe

NDP462-DevPack-KB3151934-ENU.exe

solved the problem.

解决了这个问题。