.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即可。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM