Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not find type 'OxyPlot.WindowsForms.PlotView' #640

Closed
issaksdu44 opened this issue Oct 30, 2015 · 4 comments
Closed

Could not find type 'OxyPlot.WindowsForms.PlotView' #640

issaksdu44 opened this issue Oct 30, 2015 · 4 comments

Comments

@issaksdu44
Copy link

Platform and tools

  • Sharpdevelop 5.1.0.5134
  • .NET 4.5.51209
  • Windows.Forms
  • OxyPlot.Core.1.0.0-unstable1870
  • OxyPlot.WindowsForms.1.0.0-unstable1870

Issue description

At first, everything was fine, no warnings and the designer shows the form correctly and I can easily add components.

After that I added OxyPlot correctly from the Package Management Console and I found the new PlotView component in the Custom Comonents tab.

The problem is that I can't add the component to the Form from the tools tab, so I did it by writing the equivalents statements in the source file.

The building process went fine and the application worked fine, but now I can't see the Form in the designer tab and instead I got this message:

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

ICSharpCode.FormsDesigner.FormsDesignerLoadException: System.ComponentModel.Design.Serialization.CodeDomSerializerException: Could not find type 'OxyPlot.WindowsForms.PlotView'.  Please make sure that the assembly that contains this type is referenced.  If this type is a part of your development project, make sure that the project has been successfully built using settings for your current platform or Any CPU.

System.ComponentModel.Design.Serialization.CodeDomSerializerException: The variable 'plot1' 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

snapshot here https://drive.google.com/file/d/0B9shvGtKbyqxb2ZCNzNsdi01WjQ/view?usp=sharing

The project could be downloaded here https://drive.google.com/file/d/0B9shvGtKbyqxYWMtVjlyNTR0Rmc/view?usp=sharing

@tibel
Copy link
Contributor

tibel commented Nov 4, 2015

The sample shows up without any errors in VS2015.
So this might be a SharpDevelop issue?

@objorke
Copy link
Member

objorke commented Nov 4, 2015

could this be a PCL-related issue similar to what we had for the wpf designer?

@issaksdu44
Copy link
Author

@tibel Obviously it looks a SharpDevelop issue.

@objorke I really don't know


I tried something and the result was more or less better.
I moved the declaration of the plotview component from MainForm.Designer.cs to MainForm.cs and now I can see the form in the designer but I can't add the component from the tool list (the plotview is there).

Any clues ??

@issaksdu44
Copy link
Author

Here is the solution

copy the OxyPlot.dll and OxyPlot.WindowsForms.dll files into C:\Program Files (x86)\SharpDevelop\5.1\bin, then restart SharpDevelop

http://stackoverflow.com/questions/33440843/sharpdevelop-failed-to-load-designer/33450517#33450517

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants