gpt4 book ai didi

c# - 将 winform .net Framework 3.5 迁移到 4 时出错

转载 作者:行者123 更新时间:2023-11-30 18:30:28 27 4
gpt4 key购买 nike

您好,我对此有类似的问题 link但我还是找不到解决它的方法......从我的 pathner 使用 vs 2008(框架 3.5)创建项目开始,当我尝试迁移到 vs 2010 以便我可以使用框架 4 时...我收到此错误

The designer could not be shown for this file because none of the classes within it can be designed. 

这是它的调用栈

at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.
EnsureDocument(IDesignerSerializationManager manager)
at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.
PerformLoad(IDesignerSerializationManager manager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.
PerformLoad(IDesignerSerializationManager serializationManager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.
VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.VisualStudio.
TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32 fReload)

我尝试在 vs 2010 中改回 vs 2010,目标框架为 3.5,我仍然可以打开设计器 View ...知道如何迁移到 .net 框架 4.0


添加更多信息

从@mark 所说的来看......似乎有一些引用与框架 4 不兼容......他是对的,我项目中的一些引用有警告符号......
1. Microsoft.office.core version 2.4.0.0 (microsoft office 12.0对象库)
2. Microsoft.office.interop.excel version 1.6.00 (microsoft office 12.0对象库)
3. VBIDe 版本 5.3.0.0(Microsoft Visual Basic for Applications Extensibility 5.3)

但我仍然不知道如何检查引用框架 4 的兼容性因为据我所知this是我用很多关键字从谷歌得到的最好结果并且它没有给出任何关于与框架 4 的兼容性的提示

“但即使在框架 4 中我仍然可以正常运行程序(导出到 excel),我只是无法打开设计器 View ”

最佳答案

备份你的项目然后清理(删除不兼容的引用)你的项目,它应该没问题!

关于c# - 将 winform .net Framework 3.5 迁移到 4 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21446356/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com