VS2022 打开旧项目缺乏.net 4.5 & .net 4.5.1 & .net 4.5.2 依赖问题
1、首先从 Microsoft.NETFramework.ReferenceAssemblies.net45下载一个依赖包
https://www.nuget.org/packages/microsoft.netframework.referenceassemblies.net45
https://www.nuget.org/packages/microsoft.netframework.referenceassemblies.net451
https://www.nuget.org/packages/microsoft.netframework.referenceassemblies.net452
2、然后将下载的nuget包后缀名改为.zip,解压
3、将里面的 \build .NETFramework\v4.5.1 拷贝到C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.1,
将里面的 \build .NETFramework\v4.5.2 拷贝到C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2,
覆盖即可。为防万一,可以先将C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5备份一下。
其余类似