System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. 系统找不到指定的文件。

VS 2022 .netCore 5.0 项目编译没问题 ,运行时报这个错

System.IO.FileNotFoundException:“Could not load file or assembly 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. 系统找不到指定的文件。”

 

我这里遇到这个问题的原因是,vs2022工具更新,更新后dotnet版本是8.0.100,原有的dotnet 6.0版本的启动文件(C:\Program Files\dotnet\sdk)缺失.解决方法:下载net6的sdk文件,安装后解决

 

posted @ 2024-03-27 10:43  珩知  阅读(96)  评论(0编辑  收藏  举报