你好,我遇到了与这个链接类似的问题,但是我找不到解决方法...从我的合作伙伴使用vs 2008 (framework 3.5)创建项目开始,当我尝试迁移到vs 2010以便使用framework 4时,就出现了这个错误。
The designer could not be shown for this file because none of the classes within it can be designed.
这是IT中的调用堆栈。
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的目标框架更改回3.5,但我仍然可以打开设计视图...有任何想法如何迁移到.NET Framework 4.0吗?
添加更多信息
从@mark所说的来看...似乎有一些引用与Framework 4不兼容...他是对的,我的项目中有一些引用有警告符号...
1. Microsoft.office.core版本2.4.0.0(Microsoft Office 12.0对象库)
2. Microsoft.office.interop.excel版本1.6.00(Microsoft Office 12.0对象库)
3. VBIDe版本5.3.0.0(Microsoft Visual Basic for Applications Extensibility 5.3)
但我仍然不知道如何检查这些引用是否与Framework 4兼容, 因为我得到的最佳结果是从Google得到的这里, 它没有任何关于与Framework 4兼容的提示。
"但我在Framework 4中仍然可以正常运行程序(导出到Excel),只是无法打开设计视图"