I look in many places, including google and SO, but I did not find the answer.
I recently made several changes to my application, including updating the dll (from 5.1.4.26270 to 5.1.6.405), and since VS will not open my controls, throwing this error:
Failed to load file or assembly "ZedGraph, Version = 5.1.4.26270, Culture = neutral, PublicKeyToken = ..." or one of its dependencies. The system cannot find the specified file.
Which point refers to the old version. I look everywhere, I do not see any traces of this old version.
It also throws this error:
The variable 'lineGraphControl1' is either not declared or has never been assigned.
While I call the constructor:
this.lineGraphControl1 = new Sakura.UI.Graphing.LineGraphControl();
I have tried:
- Reboot
- Clean and reboot
- Launch VS in administrator mode.
- Delete link and re-add it
Without success.
How to erase the trace of the old ZedGraph library and how can I fix this error?
Edit
Here are the changes between old and new (old)
<Reference Include="ZedGraph, Version=5.1.4.26270, Culture=neutral, PublicKeyToken=02a83cbd123fcd60, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>..\..\Lib\ZedGraph.dll</HintPath> </Reference>
<Reference Include="ZedGraph, Version=5.1.6.405, Culture=neutral, PublicKeyToken=02a83cbd123fcd60, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>..\..\Lib\ZedGraph.dll</HintPath> </Reference>
Edit 2
After clearing the VS cache and restarting the computer, the error message changed:
at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.EnsureDocument(IDesignerSerializationManager manager) at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager) at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager) at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32 fReload)
I'm lost.
Edit 3
I scan the entire disk for line 5.1.4.26270 , and the only place found is not in the project.
csproj snippet:
<Reference Include="ZedGraph, Version=5.1.6.405, Culture=neutral, PublicKeyToken=02a83cbd123fcd60, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>..\..\Lib\ZedGraph.dll</HintPath> </Reference>
Change 4:
(After Hans Passant anwser)
Here's the declaration of LineGraphControl:
public class LineGraphControl : GraphControl<Sakura.Graphing.LineGraph>
LineGraph (which uses ZedGraph objects)
public class LineGraph : Graph, ISerializable
Schedule:
[XmlInclude(typeof(StackedGraph))] [XmlInclude(typeof(LineGraph))] [XmlInclude(typeof(BubbleGraph))] [XmlInclude(typeof(BatchGraph))] [Serializable] public abstract class Graph : ISerializable
Unfortunately, ZedGraph lib is deeply associated with the software in order to change it to another.
I will not refuse changes, because I adapt the library in such a way as to make my software 250% faster.
This is where a preliminary call is made to open LineGraphControl in VS:
at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.EnsureDocument(IDesignerSerializationManager manager) at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager) at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager) at System.ComponentModel.Design.Serialization.BasicDesignerLoader.BeginLoad(IDesignerLoaderHost host)
Here is the activity log
Error message when trying to create a new LineGraphControl :

ProcMon Instance:
