欢迎来到电脑知识学习网,专业的电脑知识大全学习平台!

手机版

u盘装win7报错-(u盘装win7失败)

视频教程 发布时间:2022-12-08 15:56:15
u盘装win7报错 (u盘装win7失败)

升级vs或者装了.Net 7.0后, 工程框架用 net6 的 dotnet watch 出错 'Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=7.0.0.0'

环境

(win/linux都一样报错)

电脑

工程框架

<TargetFramework>net6.0</TargetFramework>

错误

dotnet watch StartedUnhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.File name: 'System.Runtime, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at System.Reflection.RuntimeAssembly.GetType(QCallAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type, ObjectHandleOnStack keepAlive, ObjectHandleOnStack assemblyLoadContext) at System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, 电脑Boolean ignoreCase) at System.Reflection.Assembly.GetType(String name, Boolean throwOnError) at System.StartupHookProvider.CallStartupHook(StartupHookNameOrPath startupHook) at System.StartupHookProvider.ProcessStartupHooks()

临时解决方案: 工程目录下建立 global.json 文件指定编译框架

{ "sdk": { "version": "6.0.403" }}知识共享许可协议

本作品采用 知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议 进行许可。欢迎转载、使用、重新发布,但务必保留文章署名AlexChow(包含链接: https://github.com/densen2014 ),不电脑 得用于商业目的,基于本文修改后的作品务必以相同的许可发布。如有任何疑问,请与我联系 。

AlexChow

今日头条 | 博客园 | 知乎 | Gitee | GitHub


电脑
责任编辑:电脑知识学习网

视频教程