2016-12-24 93 views
0

我有SharpDevelop 5.1,我试图测试My-FyiReporting。我所拥有的只是一个mainform,一个My-fyireporting RDLViewer和一个My-fyireporting工具条。查看器在我运行该程序时工作正常,但由于某种原因,它在SharpDevelop表单设计器中导致异常。这是昨天出于某种原因,但今天当我试图使用这个我注意到表单设计器不会加载。myfyireporting在SharpDevelop的表单设计器中导致异常

我的程序只有一个名为rdlViewer1的RDLViewer和一个名为viewerToolstrip1的工具条。我没有向任何.cs源文件添加任何代码,因为我只是试图测试my-fyireporting系统。

这里是表单生成器的MainForm.Designer.cs文件中的例外:

Failed to load designer. Check the source code for syntax errors and check if all references are available. 

ICSharpCode.FormsDesigner.FormsDesignerLoadException: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not load file or assembly 'RdlEngine, Version=4.12.5881.19802, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. 
    at fyiReporting.RdlViewer.RdlViewer..ctor() 
    --- End of inner exception stack trace --- 
    at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) 
    at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) 
    at System.SecurityUtils.SecureConstructorInvoke(Type type, Type[] argTypes, Object[] args, Boolean allowNonPublic, BindingFlags extraFlags) 
    at System.ComponentModel.ReflectTypeDescriptionProvider.CreateInstance(IServiceProvider provider, Type objectType, Type[] argTypes, Object[] args) 
    at System.ComponentModel.TypeDescriptor.TypeDescriptionNode.CreateInstance(IServiceProvider provider, Type objectType, Type[] argTypes, Object[] args) 
    at System.ComponentModel.TypeDescriptor.CreateInstance(IServiceProvider provider, Type objectType, Type[] argTypes, Object[] args) 
    at System.ComponentModel.Design.DesignSurface.CreateInstance(Type type) 
    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.CodeDomSerializerBase.DeserializeInstance(IDesignerSerializationManager manager, Type type, Object[] parameters, String name, Boolean addToContainer) 
    at System.ComponentModel.Design.Serialization.ComponentCodeDomSerializer.DeserializeInstance(IDesignerSerializationManager manager, Type type, Object[] parameters, String name, Boolean addToContainer) 
    at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression) 
    at System.ComponentModel.Design.Serialization.CodeDomSerializer.DeserializeStatementToInstance(IDesignerSerializationManager manager, CodeStatement statement) 
    at System.ComponentModel.Design.Serialization.CodeDomSerializer.Deserialize(IDesignerSerializationManager manager, Object codeObject) 
    at ICSharpCode.FormsDesigner.Services.ProjectResourcesComponentCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, Object codeObject) 
    at System.Windows.Forms.Design.ControlCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, Object codeObject) 
    at ICSharpCode.FormsDesigner.Services.ProjectResourcesComponentCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, Object codeObject) 
    at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.DeserializeName(IDesignerSerializationManager manager, String name, CodeStatementCollection statements) 

System.ComponentModel.Design.Serialization.CodeDomSerializerException: The variable 'rdlViewer1' is either undeclared or was never assigned. 
    at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.Error(IDesignerSerializationManager manager, String exceptionText, String helpLink) 
    at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression) 
    at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializePropertyAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement, CodePropertyReferenceExpression propertyReferenceEx, Boolean reportError) 
    at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement) 
    at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement) 

System.ComponentModel.Design.Serialization.CodeDomSerializerException: The variable 'rdlViewer1' is either undeclared or was never assigned. 
    at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.Error(IDesignerSerializationManager manager, String exceptionText, String helpLink) 
    at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression) 
    at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression) 
    at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement) 


    at ICSharpCode.FormsDesigner.FormsDesignerViewContent.LoadDesigner() 
    at ICSharpCode.FormsDesigner.FormsDesignerViewContent.LoadAndDisplayDesigner() 
    at ICSharpCode.FormsDesigner.FormsDesignerViewContent.LoadInternal(OpenedFile file, Stream stream) 
    at ICSharpCode.SharpDevelop.Workbench.AbstractViewContentHandlingLoadErrors.Load(OpenedFile file, Stream stream) 

这里是在MainForm.Designer.cs文件中的代码:

namespace fyireport_test 
{ 
    partial class MainForm 
    { 
     /// <summary> 
     /// Designer variable used to keep track of non-visual components. 
     /// </summary> 
     private System.ComponentModel.IContainer components = null; 
     private fyiReporting.RdlViewer.RdlViewer rdlViewer1; 
     private fyiReporting.RdlViewer.ViewerToolstrip viewerToolstrip1; 

     /// <summary> 
     /// Disposes resources used by the form. 
     /// </summary> 
     /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> 
     protected override void Dispose(bool disposing) 
     { 
      if (disposing) { 
       if (components != null) { 
        components.Dispose(); 
       } 
      } 
      base.Dispose(disposing); 
     } 

     /// <summary> 
     /// This method is required for Windows Forms designer support. 
     /// Do not change the method contents inside the source code editor. The Forms designer might 
     /// not be able to load this method if it was changed manually. 
     /// </summary> 
     private void InitializeComponent() 
     { 
      this.rdlViewer1 = new fyiReporting.RdlViewer.RdlViewer(); 
      this.viewerToolstrip1 = new fyiReporting.RdlViewer.ViewerToolstrip(); 
      this.SuspendLayout(); 
      // 
      // rdlViewer1 
      // 
      this.rdlViewer1.Cursor = System.Windows.Forms.Cursors.Default; 
      this.rdlViewer1.dSubReportGetContent = null; 
      this.rdlViewer1.Folder = null; 
      this.rdlViewer1.HighlightAll = false; 
      this.rdlViewer1.HighlightAllColor = System.Drawing.Color.Fuchsia; 
      this.rdlViewer1.HighlightCaseSensitive = false; 
      this.rdlViewer1.HighlightItemColor = System.Drawing.Color.Aqua; 
      this.rdlViewer1.HighlightPageItem = null; 
      this.rdlViewer1.HighlightText = null; 
      this.rdlViewer1.Location = new System.Drawing.Point(89, 42); 
      this.rdlViewer1.Name = "rdlViewer1"; 
      this.rdlViewer1.PageCurrent = 1; 
      this.rdlViewer1.Parameters = ""; 
      this.rdlViewer1.ReportName = null; 
      this.rdlViewer1.ScrollMode = fyiReporting.RdlViewer.ScrollModeEnum.Continuous; 
      this.rdlViewer1.SelectTool = false; 
      this.rdlViewer1.ShowFindPanel = false; 
      this.rdlViewer1.ShowParameterPanel = true; 
      this.rdlViewer1.ShowWaitDialog = true; 
      this.rdlViewer1.Size = new System.Drawing.Size(513, 315); 
      this.rdlViewer1.SourceFile = null; 
      this.rdlViewer1.SourceRdl = null; 
      this.rdlViewer1.TabIndex = 0; 
      this.rdlViewer1.UseTrueMargins = true; 
      this.rdlViewer1.Zoom = 0.4709417F; 
      this.rdlViewer1.ZoomMode = fyiReporting.RdlViewer.ZoomEnum.FitWidth; 
      // 
      // viewerToolstrip1 
      // 
      this.viewerToolstrip1.ImageScalingSize = new System.Drawing.Size(20, 20); 
      this.viewerToolstrip1.Location = new System.Drawing.Point(0, 0); 
      this.viewerToolstrip1.Name = "viewerToolstrip1"; 
      this.viewerToolstrip1.Size = new System.Drawing.Size(719, 27); 
      this.viewerToolstrip1.TabIndex = 1; 
      this.viewerToolstrip1.Text = "viewerToolstrip1"; 
      this.viewerToolstrip1.Viewer = this.rdlViewer1; 
      // 
      // MainForm 
      // 
      this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); 
      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 
      this.ClientSize = new System.Drawing.Size(719, 451); 
      this.Controls.Add(this.viewerToolstrip1); 
      this.Controls.Add(this.rdlViewer1); 
      this.Name = "MainForm"; 
      this.Text = "fyireport test"; 
      this.ResumeLayout(false); 
      this.PerformLayout(); 

     } 
    } 
} 

我曾尝试彻底清理项目和解决方案,重建它们,然后重新启动SharpDevelop。这似乎没有改变任何东西。

+0

为什么使用SharpDevelop?第三方供应商可能永远不会测试除Visual Studio之外的其他任何内容,因此您也应该使用VS。 –

回答

1

您应该能够通过复制RdlEngine.dll文件到SharpDevelop的bin目录,以解决这个问题:

C:\Program Files (x86)\SharpDevelop\5.0\bin 

具有装配在那里应该允许SharpDevelop的窗体设计器来加载它。

相关问题