Visual Studio笔记:安装.NET Framework报错:找不到对象或属性

背景

项目的.NET Framework需要升级到4.8

安装.NET Framework 4.8的开发者工具包时报错

原因

  • 没有安装.NET Framework 4.8开发者工具包的先决条件,需要安装.NET Framework 4.6.2-4.8以下版本的开发者工具包后 才能安装4.8
  • 你的电脑已经安装了.NET Framework 4.8开发者工具包

方案

如果是缺少安装.NET Framework 4.8开发者工具包的先决条件,那就先安装先决条件,如安装.NET Framework 4.6.2的开发者工具包

再安装.NET Framework 4.8的开发者工具包

又失败了 说明我的的电脑已经装过4.8了

创建一个.NET Framework 4.8版本的项目 证明4.8安装过了

呐 框架下拉选项中有4.8 

项目正常创建了

Release版本识别.NET Framework版

官网:确定已安装的 .NET Framework 版本 - .NET Framework | Microsoft Learn

计算机上安装的 .NET Framework 版本(4.5 及更高版本)列出在注册表中,位于 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full。 如果缺少 Full 子项,则未安装 .NET Framework 4.5 或更高版本

注册表中的 Release REG_DWORD 值代表已安装的 .NET Framework 版本

.NET Framework 版本Release 的值
.NET Framework 4.5所有 Windows 操作系统:378389
.NET Framework 4.5.1在 Windows 8.1 和 Windows Server 2012 R2 上:378675
在所有其他 Windows 操作系统上:378758
.NET Framework 4.5.2所有 Windows 操作系统:379893
.NET Framework 4.6在 Windows 10 上:393295
在所有其他 Windows 操作系统上:393297
.NET Framework 4.6.1在 Windows 10 11 月更新系统上:394254
在所有其他 Windows 操作系统(包括 Windows 10)上:394271
.NET Framework 4.6.2在 Windows 10 周年更新和 Windows Server 2016 上:394802
在所有其他 Windows 操作系统(包括其他 Windows 10 操作系统)上:394806
.NET Framework 4.7在 Windows 10 创意者更新上:460798
在所有其他 Windows 操作系统(包括其他 Windows 10 操作系统)上:460805
.NET Framework 4.7.1在 Windows 10 Fall Creators Update 和 Windows Server 版本 1709 上:461308
在所有其他 Windows 操作系统(包括其他 Windows 10 操作系统)上:461310
.NET Framework 4.7.2在 Windows 10 2018 年 4 月更新和 Windows Server 版本 1803 上:461808
在除 Windows 10 2018 年 4 月更新和 Windows Server 版本 1803 之外的所有 Windows 操作系统上:461814
.NET Framework 4.8在 Windows 10 的 2019 年 5 月更新和 Windows 10 的 2019 年 11 月更新上:528040
在 Windows 10 的 2020 年 5 月更新、2020 年 10 月更新、2021 年 5 月更新、2021 年 11 月更新和 2022 年更新上:528372
在 Windows 11 和 Windows Server 2022 上:528449
在所有其他 Windows 操作系统(包括其他 Windows 10 操作系统)上:528049
.NET Framework 4.8.1在 Windows 11 2022 更新和 Windows 11 2023 更新上:533320
所有其他 Windows 操作系统:533325

打开注册表 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full

 我Release版本号 528049 和官网说明吻合 说明已经安装过了

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

拌颗糖

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值