[英]ECS1705 which has a higher version than referenced assembly
My project called 'Gui Tester' has a microsoft.windowsdesktop.App.WindowsForms framework version 6.0.0.我名为“Gui Tester”的项目有一个 microsoft.windowsdesktop.App.WindowsForms 框架版本 6.0.0。 In addition, it has a project reference to WinForms class called 'WinFormsLibrary3' which its framework version 6.0.9.
此外,它还有一个名为“WinFormsLibrary3”的 WinForms class 项目引用,其框架版本为 6.0.9。 This causes the error below.
这会导致以下错误。 How do I make both versions the same in order to solve this issue?
如何使两个版本相同以解决此问题? I was unable to find a way to remove/add/update a framework.
我找不到删除/添加/更新框架的方法。
A link to a sample solution (\AssemblyError\GuiTester\GuiTester.sln) can be found here - https://1drv.ms/u/s?AuZvh6FckScbhMpi02_Dm-YCBE00ew?e=KKNyLi可以在此处找到示例解决方案 (\AssemblyError\GuiTester\GuiTester.sln) 的链接 - https://1drv.ms/u/s?AuZvh6FckScbhMpi02_Dm-YCBE00ew?e=KKNyLi
Error CS1705 Assembly 'WinFormsLibrary3' with identity 'WinFormsLibrary3, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' uses 'System.Windows.Forms, Version=6.0.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' which has a higher version than referenced assembly 'System.Windows.Forms' with identity 'System.Windows.Forms, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'身份为“WinFormsLibrary3,版本=1.0.0.0,文化=中性,PublicKeyToken=null”的错误 CS1705 程序集“WinFormsLibrary3”使用具有更高版本的“System.Windows.Forms,版本=6.0.2.0,文化=中性,PublicKeyToken=b77a5c561934e089”比引用的程序集“System.Windows.Forms”具有身份“System.Windows.Forms,版本=6.0.0.0,文化=中性,PublicKeyToken=b77a5c561934e089”
There is no way your Gui tester project (version 6.0.0) can open your winFormsLibrary3 (version 6.0.9).您的 Gui 测试程序项目(版本 6.0.0)无法打开您的 winFormsLibrary3(版本 6.0.9)。 Since the lower version does not recognize or support a higher version which it never designs for.
由于较低版本不识别或支持它从未设计过的较高版本。 What you can do is create a new solution of gui tester with a higher version and just copy all the files from the old gui tester into your new gui tester.
您可以做的是创建一个具有更高版本的 gui 测试器的新解决方案,并将所有文件从旧的 gui 测试器复制到您的新 gui 测试器中。
As I wrote in the comment, you can try downgrade your target framework, but some times it cause unexpected behaviour正如我在评论中所写,您可以尝试降级目标框架,但有时会导致意外行为
https://ourtechroom.com/fix/how-to-downgrade.net-framework-version-in-visual-studio/
https://ourtechroom.com/fix/how-to-downgrade.net-framework-version-in-visual-studio/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.