Skip to content

Error saying haven't got 'System.Drawing.Common, Versions=4.0.0.1' - WinForm VB.net #924

@vrdriver

Description

@vrdriver

Hi Scott, this is a bit of a curly question, as I don't know why things are happening this way.

Some slight background on this, as it has happened before with my current app instance...

I am working on a program using VS 16.9.2, and my program is a VB.NET Winform app, rather than using C#.
My program has been working fine, but then when I try and add a SP chart to the program, I get a nice little ambiguous error.
I can add SP and SP.WinForms through NuGet and it adds tem to the application fine, but, when I try to add a SP chart to a form, I get a popup message, telling me that I haven't got 'System.Drawing.Common, Versions=4.0.0.1' etc installed...

Screen Shot 2021-03-29 at 13 40 40

I know that I'm fulfilling the requirements of SP, as I have version 4.0.0.2 installed, and the latest version of SP as well. (4.0.48)

Screen Shot 2021-03-29 at 13 42 11

Screen Shot 2021-03-29 at 13 52 34

So, I did some testing and recreated the project like before using .NET Framework 4.7.2, (fortunately it's only a single form application so it's not too hard), and it all worked and I was able to add SP items. However, since then I have been using it, I am once again having the same error appear

The thing is the error is now in a different place when I try to open up the Design view of my form.

I saw that someone else had a similar problem, but not exactly: #655

Do you have any suggestions, or know why it would work, and then after a while decide to not want to load the Design view?

Here's a screen shot of the error, along with the text as well.

Screen Shot 2021-03-29 at 13 33 40

    To prevent possible data loss before loading the designer, the following errors must be resolved:    
    
   Could not load file or assembly 'System.Drawing.Common, Version=4.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.     
    
Instances of this error (3)  
 
1.   Hide Call Stack 
 
at ScottPlot.Renderable.GridLines..ctor()
at ScottPlot.Settings..ctor()
at ScottPlot.Plot..ctor(Int32 width, Int32 height)
at ScottPlot.FormsPlot.Reset(Plot plt)
at ScottPlot.FormsPlot..ctor()  
 
2.   Hide Call Stack 
 
at ScottPlot.Renderable.GridLines..ctor()
at ScottPlot.Settings..ctor()
at ScottPlot.Plot..ctor(Int32 width, Int32 height)
at ScottPlot.FormsPlot.Reset(Plot plt)
at ScottPlot.FormsPlot..ctor()  
 
3.   Hide Call Stack 
 
at ScottPlot.Renderable.GridLines..ctor()
at ScottPlot.Settings..ctor()
at ScottPlot.Plot..ctor(Int32 width, Int32 height)
at ScottPlot.FormsPlot.Reset(Plot plt)
at ScottPlot.FormsPlot..ctor()  
 
Help with this error  
 
Could not find an associated help topic for this error. Check Windows Forms Design-Time error list   
 
   The variable 'FormsPlot3' is either undeclared or was never assigned.     Go to code  
     
Instances of this error (1)  
 
1.   WindowsApp1 Form1.Designer.vb Line:888 Column:1   Show Call Stack  
 
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)  
 
  
   The variable 'FormsPlot2' is either undeclared or was never assigned.     Go to code  
     
 
Instances of this error (1)  
 
1.   WindowsApp1 Form1.Designer.vb Line:890 Column:1   Show Call Stack  
 
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)  
 
  
   The variable 'FormsPlot1' is either undeclared or was never assigned.     Go to code   
  
 
Instances of this error (1)  
 
1.   WindowsApp1 Form1.Designer.vb Line:891 Column:1   Show Call Stack  
 
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)  

As you can see, it's a bit on the weird side, yet my program still compiles and runs fine...

Metadata

Metadata

Assignees

No one assigned

    Labels

    BUGunexpected behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions