尝试打开 telerik 报告时出现“值不能为空。参数名称:实例”错误

问题描述 投票:0回答:8

在我的解决方案中,我有 telerik 报告,当尝试在 Visual Studio 2010 设计器中打开它们时,我收到此错误:

Value cannot be null. Parameter name: instance

Call Stack 

at System.ComponentModel.TypeDescriptor.AddAttributes(Object instance, Attribute[] attributes)
at Microsoft.VisualStudio.Design.VSDesignSurface.CreateDesigner(IComponent component, Boolean rootDesigner)
at System.ComponentModel.Design.DesignerHost.AddToContainerPostProcess(IComponent component, String name, IContainer containerToAddTo)
at System.ComponentModel.Design.DesignerHost.PerformAdd(IComponent component, String name)
at System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.CreateComponent(Type componentType, String name)
at System.ComponentModel.Design.Serialization.DesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, CodeTypeDeclaration declaration)
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)  

当我运行解决方案时,它们就会出现并且效果很好。所以,唯一的问题是设计师和这个错误。

提前致谢。

c# visual-studio-2010 telerik telerik-reporting
8个回答
14
投票

我重新安装了 Telerik Reporting 组件,删除并再次添加了 DLL,现在工作正常。


6
投票

我收到此错误是因为我从 Progress 控制面板下载的 telerik 库版本错误。这是我纠正这种情况的方法。

如果您没有进度控制面板,请参阅此处:https://docs.telerik.com/devtools/wpf/getting-started/installation/installation-installing-from-progress-control-panel

我正在使用 Telerik Reporting 库,它是旧版本,因为我的公司尚未更新许可证,但进度控制面板将默认下载最新版本。

要查看您需要的版本,请右键单击您的参考,然后单击“属性”。 enter image description here

我需要的版本是10.2.16.1025。

enter image description here

现在在进度控制面板中,单击库。

enter image description here

现在单击“查看所有版本”

enter image description here

这将显示安装了哪些版本。对于您不需要的版本,选中“删除”,对于您需要的版本,选中“安装”。然后点击“关闭”。

enter image description here

然后点击右下角的“继续”。

enter image description here

最后,除非您需要,否则我会取消选中“本地演示”。选中“是,我接受...”并单击“继续”。这将使安装/卸载过程继续进行。

enter image description here


2
投票

关闭 Visual Studio 并安装“Telerik_Reporting.msi”。然后打开 Visual Studio 和你的项目


2
投票
  1. 您只需删除 Telerik 引用即可。
  2. 关闭损坏的表格。
  3. 添加新的 Windows 表单,然后将 Telerik 组件添加到新表单(例如:telelerikButton)。
  4. 打开损坏的表格,稍等片刻,你会发现一切恢复正常。

1
投票

我在尝试打开 SQL 单元测试设计器(与 Telerik 无关)时遇到此错误。

我的“解决方案”是重新创建测试并复制内容。


1
投票

更改项目的框架版本。我用这种方法修复了错误。


1
投票

我在使用 C# 模块的 ActiveReports 时遇到了同样的问题。 它在 VB 2017 中运行良好。

重新安装最新的 AR 更新解决了 C# 版本的问题


0
投票

就我而言,我通过进度控制面板安装了两个版本的 Telerik Reporting。我必须删除不正确的版本,然后它又开始工作了。

最新问题
© www.soinside.com 2019 - 2024. All rights reserved.