2016-12-24 4 views
0

SharpDevelop 5.1이 있고 My-FyiReporting을 테스트하려고합니다. 내가 갖고있는 것은 메인 폼, My-fyireporting RDLViewer 및 My-fyireporting 툴 스트립뿐입니다. 뷰어는 프로그램을 실행할 때 잘 작동하지만 어떤 이유로 SharpDevelop 폼 디자이너에서 예외가 발생합니다. 어제는 어제 작동 했었지만 오늘은 이것을 사용하려고 할 때 양식 디자이너가로드되지 않는다는 것을 알았습니다.myfyireporting은 SharpDevelop의 폼 디자이너에서 예외를 발생시킵니다.

내 프로그램에는 rdlViewer1이라는 RDLViewer와 viewerToolstrip1이라는 도구 모음이 있습니다. 필자는 my-fyireporting 시스템을 테스트하려고하기 때문에 .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(); 

     } 
    } 
} 

I가 시도 : 여기

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 파일의 코드입니다 : 여기

양식 빌더의 MainForm.Designer.cs 파일에서 예외입니다 프로젝트 및 솔루션을 완전히 지우고 다시 작성한 다음 SharpDevelop를 다시 시작하십시오. 이것은 아무것도 바뀌지 않는 것 같습니다.

+0

왜 SharpDevelop를 사용합니까? 타사 공급 업체는 Visual Studio 이외의 다른 제품을 테스트하지 않으므로 VS도 사용해야합니다. –

답변

1

당신은 SharpDevelop bin 디렉토리에 RdlEngine.dll 파일을 복사하여이 문제를 해결 할 수 있어야한다 :

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

SharpDevelop 양식 디자이너가 그것을로드가 허용해야에 어셈블리를 가졌어요.

관련 문제