.Net启动程序报错:It was not possible to find any compatible framework version

阅文时长 | 0.68分钟 字数统计 | 1092字符
主要内容 | 1、引言&背景 2、解决方案 3、声明与参考资料
『.Net启动程序报错:It was not possible to find any compatible framework version』
编写人 | SCscHero 编写时间 | 2021/12/18 PM11:37
文章类型 | 系列 完成度 | 已完成
座右铭 每一个伟大的事业,都有一个微不足道的开始。

一、引言&背景   完成度:100%

a) 应对问题

启动.Net程序时,遇到了如下错误:

It was not possible to find any compatible framework version 
The framework' Microsof t. AspNetCore. App,version' 2.2.0'' (x64) was not found.
The following frameworks were found:
2. 1.30 at [c: \Program Files dotnet \shared\Microsof t. AspNetCore. App]
3. 1. 18 at [C: \Program Files dotnet \shared\Microsoft. AspNetCore. App
5.0.9 at [C: Program Files dotnet shared Microsof t. AspNe tCore. App
6.0.0 rc.1.21452.15 at [C: \Program Files dotnet \shared\Mi crosof t. AspNetCore. App]
You can resolve the problem by installing the specified framework and/or SDK.
The specified framework can be found at: 
https:// aka. ms/ dotnet -core-applaunch?framework=Microsof t. AspNetCore. App&framework version=2. 2. O&arch=x64&rid=win10-x64
C: \Program Files dotnet \dotnet. exe (process 8432) exited with code 2147450730.
To automatically close the console when debugging stops, enable Tools >0ptions- >Debugging >Automatically close the console when debugging stops.
Press any key to close this window...

b) 应用场景

  • 常见于项目中使用了多.Net开发框架版本时,如使用了.Net Core3.1、.Net Core2.2、.Net Framework4.7等等多个SDK。
  • 常见于多项目多开发框架版本启动的场景。

二、解决方案   完成度:100%

a) 步骤1:检查开发框架组件是否安装

Tools -> Get Tools and Features... -> Individual component选项卡。

b) 步骤2:下载SDK

如果步骤1安装后仍不行,需要单独下载SDK了。链接是:https://dotnet.microsoft.com/en-us/download。

目前微软主推.Net6的统一版本,所以有些入口可能不明显,整理如下:

三、声明与参考资料   完成度:100%

原创博文,未经许可请勿转载。

如有帮助,欢迎点赞、收藏、关注。如有问题,请评论留言!如需与博主联系的,直接博客私信SCscHero即可。

posted on 2021-12-19 00:03  SCscHero  阅读(1573)  评论(0编辑  收藏  举报

导航