VS 2019项目目标框架未安装 -.NET Framework 4.0
刚刚在新系统上安装了VS 2019 Pro。当我使用.NET 4.0项目打开解决方案时,我会收到此错误:未安装项目目标框架。
选择下载时,它可以进入此处,但没有.NET Framework 4.0的选项。
在项目设置中,针对目标框架中的.NET Framework 4.0没有选项:
https://dotnet.microsoft.com/en-us/download/visualload/visual-studio-sdks?cid=getDotnetsdk
我有尝试安装4.6.2、4.5.2等。
如何让这个项目打开?它在我的另一台机器上打开。它具有项目设置中的目标框架的这些选项:
请不要说更改框架版本,我们需要此旧版本,用于运行XP的非常旧的计算机,并赢了7这不能升级。
谢谢
Just installed VS 2019 Pro on a new system. When I open a solution with .net 4.0 project, I get this error: Project Target Framework Not Installed.
When I choose download it, it goes here but does not have option for .net framework 4.0.
In project settings there is no option for .Net Framework 4.0 in targeting framework:
https://dotnet.microsoft.com/en-us/download/visual-studio-sdks?cid=getdotnetsdk
I have tried installing 4.6.2, 4.5.2, etc.
How can I get this project to open? It opens on my other machine. It has these options for Target framework in project settings:
Please don't say change the framework version, we need this older version for very old computers running XP and Win 7 that cannot be upgraded.
thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您必须直接去他们的下载网站。如另一个被倾销的正确答案所示,即使它已经过去,它仍然可以使用。
https://stackoverflow.com/a/a/72870727/9008140
尽管您的安装程序很可能会看到它丢失并下载。
You have to go directly to their download site. As shown in another correct answer that was downvoted, it's still available even though it's past end-of-life.
https://stackoverflow.com/a/72870727/9008140
You can package the install files with your app just in case, although most likely your installer will see that it's missing and download it anyway.
您可以尝试在此处尝试下载.net 4.0: .com/en-us/download/dotnet-framework/net40
强制性警告:安装一个旧的,未维护的.NET框架带有安全风险。您必须确定这些Windows XP PC脆弱并管理上述风险的程度取决于您。
You can try downloading .Net 4.0 here: https://dotnet.microsoft.com/en-us/download/dotnet-framework/net40
Mandatory warning: Installing an old, unmaintained .Net framework comes with security risks. It's up to you to determine how much those Windows XP PCs are vulnerable and manage said risks.