Could not load file or assembly 'System.Windows.Forms, Version=6.0.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089


项目升级后提示错误 System.IO.FileNotFoundException: Could not load file or assembly 'System.Windows.Forms, Version=6.0.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. 系统找不到指定的文件。
问题提示很明显,System.Windows.Forms的版本号问题。
原因分析:
本地编译环境:.net6.0.2 运行环境:.net6.0.1

dotnet/winforms Issue #6663

解决方案:
1.升级运行环境的.net版本
1)系统运行在众多计算机上,升级版本耗时耗力
2)部门内开发环境不统一,有用.net6.0.1,也是.net6.0.2。我也是刚升级的。
因此此方案不被采纳
2.降级编译环境的.net版本
1)编译计算机上需安装.net6.0.1 SDK:64位下载32位下载
2)解决方案根目录创建文件global.json
{ "sdk": { "version": "6.0.101", "rollForward": "disable" } }

3)重新生成解决方案


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



猜您在找 未能从程序集“System.Transactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”中加载类型“System.Transactions.TransactionScopeAsyncFlowOption” 未能从程序集“mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”中加载类型“System.Runtime.CompilerServices.TuppressIldasmAttribute”。已解决 解决 未能从程序集“System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”中加载 解决:未能加载文件或程序集“EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089” Could not load type 'System.Reflection.AssemblySignatureKeyAttribute' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c hangfire报错 Could not load file or assembly 'DynamicProxyGenAssembly2, Culture=neutral, PublicKeyToken=null'. 系统找不到指定的文件。 ArgumentException: The Assembly Mono.WebBrowser is referenced by System.Windows.Forms ('Assets/Plugins/System.Windows.Forms.dll'). But the dll is not allowed to be included or could not be found. NPOI.POIXMLException ---> System.IO.FileLoadException: 未能加载文件或程序集“ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73”或它的某一个依赖项。 Could not load file or assembly 'System.ValueTuple' 类型Universe无法解析程序 集:System.Design,Version=2.0.0.0,Culture=neutral,PublickeyToken=b03f5f7f11d50a3a,
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM