未安装 .NET 4.5.2 的目标包 [英] Targeting pack for .NET 4.5.2 not installed
问题描述
在 Visual Studio 中打开现有解决方案时,显示
<块引用>C# 项目..."针对的是.NETFramework,Version=v4.5.2",该机器未安装.
我已经试过了
- 选择选项 2,但它使我进入通用的 Microsoft 搜索页面 (.确保您下载的是开发者包",而不是运行时".
离线安装程序的直接链接:4.5.2、4.6、4.6.1, 4.6.2, 4.7, 4.7.1、4.7.2
这个问题似乎影响了 Visual Studio 2013 和 Visual Studio 2015.目标包包含在 Visual Studio 2017 中.
过时的链接:
- http://getdotnet.azurewebsites.net/target-dotnet-platforms.html
- http://blogs.msdn.com/b/dotnet/p/dotnet_sdks.aspx
我是如何找到该链接的
首先,选择选项 1,将目标更改为 .NET Framework 4.5"
接下来,转到受影响项目的项目选项,选择应用程序",然后从目标框架列表中选择安装其他框架...":
这会将您带到一个网站,您可以在其中选择您的 Visual Studio 版本并下载目标包(称为开发者包).
When opening an already existing solution in Visual Studio, it says
The C# project "..." is targeting ".NETFramework,Version=v4.5.2", which is not installed on this machine.
I have already tried
- Selecting option 2, but it brings me to a generic Microsoft search page (http://www.microsoft.com/en-us/default.aspx)
- Installing the .NET Framework 4.5 SDK (as proposed by this answer)
解决方案Official list of all targeting packs: https://www.microsoft.com/net/targeting. Make sure you download the "developer pack", not "runtime".
Direct links to offline installers: 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2
This problem seems to affect Visual Studio 2013 and Visual Studio 2015. The targeting packs are included in Visual Studio 2017.
Outdated links:
- http://getdotnet.azurewebsites.net/target-dotnet-platforms.html
- http://blogs.msdn.com/b/dotnet/p/dotnet_sdks.aspx
How I found that link
First, choose option 1, "Change the target to .NET Framework 4.5"
Next, go to the project options of the affected project, select "Application" and then choose "Install other frameworks..." from the list of target frameworks:
This brings you to a website where you can choose your version of Visual Studio and download the targeting pack (called developer pack).
这篇关于未安装 .NET 4.5.2 的目标包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!