2016-12-24 21 views
0

私はSharpDevelop 5.1を持っており、私はMy-FyiReportingをテストしようとしています。私が持っているのは、メインフォーム、My-fyireporting RDLViewer、My-fyireportingツールストリップです。ビューアはプログラムを実行するときに正常に動作しますが、何らかの理由でSharpDevelopフォームデザイナで例外が発生します。これは何らかの理由で昨日働いていましたが、今日私がこれを使用しようとしていたときに、フォームデザイナーが読み込まれないことに気付きました。myfyireportingはSharpDevelopのフォームデザイナで例外を発生させます

私のプログラムには、rdlViewer1というRDLViewerと、viewerToolstrip1というツールストリップがあります。私はmy-fyireportingシステムをテストしようとしているので、.csソースファイルのいずれにもコードを追加していません。ここで

は、フォームビルダの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(); 

     } 
    } 
} 

:ここ

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ファイル内のコードですプロジェクトとソリューションを完全にきれいにして再構築し、SharpDevelopを再起動します。これは何も変わっていないようです。

+0

なぜSharpDevelopを使用しますか?サードパーティのベンダーはVisual Studio以外のものをテストすることはできませんので、VSも使うべきです。 –

答えて

1

あなたはSharpDevelopのbinディレクトリにRdlEngine.dllファイルをコピーすることによってこの問題を解決することができるはずです。

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

SharpDevelopのフォームデザイナは、それをロードすることができるようにすべきでアセンブリを有します。

関連する問題