title: VS won't open control since dll update
body: <p>I've look in many places including google and SO but I didn't find any relevant answer.</p>
  
  <p>I've made a few changes in my app recently, including updating ZedGraph dll (from 5.1.4.26270 to 5.1.6.405) and since, VS won't open my controls throwing this error:</p>
  
  <blockquote>
    <p>Could not load file or assembly 'ZedGraph, Version=5.1.4.26270, Culture=neutral, PublicKeyToken=...' or one of its dependencies. The system cannot find the file specified.</p>
  </blockquote>
  
  <p>Which point to the old version. I've look <em>everywhere</em>, I don't find any trace of this old version.</p>
  
  <p>It also throw this error:</p>
  
  <blockquote>
    <p>The variable 'lineGraphControl1' is either undeclared or was never assigned.</p>
  </blockquote>
  
  <p>Whereas I call the constructor: </p>
  
  <pre><code>this.lineGraphControl1 = new Sakura.UI.Graphing.LineGraphControl();
  </code></pre>
  
  <p>I've try to:</p>
  
  <ul>
  <li>Reboot</li>
  <li>Clean and Rebluid</li>
  <li>Start VS in admin mode</li>
  <li>Remove the reference and re-add it</li>
  </ul>
  
  <p>Without success.</p>
  
  <p>How can I erase trace of the old ZedGraph lib and how can I fix this error?</p>
  
  <h1>Edit</h1>
  
  <p>Here's the changes between the old version and the new (old first)</p>
  
  <pre><code>&lt;Reference Include="ZedGraph, Version=5.1.4.26270, Culture=neutral, PublicKeyToken=02a83cbd123fcd60, processorArchitecture=MSIL"&gt;
    &lt;SpecificVersion&gt;False&lt;/SpecificVersion&gt;
    &lt;HintPath&gt;..\..\Lib\ZedGraph.dll&lt;/HintPath&gt;
  &lt;/Reference&gt;
  </code></pre>
  
  <hr>
  
  <pre><code>&lt;Reference Include="ZedGraph, Version=5.1.6.405, Culture=neutral, PublicKeyToken=02a83cbd123fcd60, processorArchitecture=MSIL"&gt;
    &lt;SpecificVersion&gt;False&lt;/SpecificVersion&gt;
    &lt;HintPath&gt;..\..\Lib\ZedGraph.dll&lt;/HintPath&gt;
  &lt;/Reference&gt;
  </code></pre>
  
  <h1>Edit 2</h1>
  
  <p>After clearing the cache of VS and rebooting the computer, the error message changed:</p>
  
  <pre><code>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) 
  </code></pre>
  
  <p>I am lost.</p>
  
  <h1>Edit 3</h1>
  
  <p>I've search through the whole disk for the string <code>5.1.4.26270</code> and the only place found are not in the project.</p>
  
  <hr>
  
  <p>csproj snippet :</p>
  
  <pre><code>&lt;Reference Include="ZedGraph, Version=5.1.6.405, Culture=neutral, PublicKeyToken=02a83cbd123fcd60, processorArchitecture=MSIL"&gt;
    &lt;SpecificVersion&gt;False&lt;/SpecificVersion&gt;
    &lt;HintPath&gt;..\..\Lib\ZedGraph.dll&lt;/HintPath&gt;
  &lt;/Reference&gt;
  </code></pre>
  
  <hr>
  
  <h1>Edit 4:</h1>
  
  <p>(After <a href="https://stackoverflow.com/users/17034/hans-passant">Hans Passant</a> anwser)</p>
  
  <p>Here's the LineGraphControl declaration:</p>
  
  <pre><code>public class LineGraphControl : GraphControl&lt;Sakura.Graphing.LineGraph&gt;
  </code></pre>
  
  <p>The LineGraph (which use ZedGraph objects)</p>
  
  <pre><code>public class LineGraph : Graph, ISerializable
  </code></pre>
  
  <p>The Graph:</p>
  
  <pre><code>[XmlInclude(typeof(StackedGraph))]
  [XmlInclude(typeof(LineGraph))]
  [XmlInclude(typeof(BubbleGraph))]
  [XmlInclude(typeof(BatchGraph))]
  [Serializable]
  public abstract class Graph : ISerializable
  </code></pre>
  
  <p>Unfortunately the ZedGraph lib is to deeply linked to the software to change it to another one.</p>
  
  <p>I won't rollback the changes because I've adapt the library in a way that make my software graphing 250% faster.</p>
  
  <p>Here's the callstack of the tentative to open the LineGraphControl in VS:</p>
  
  <pre><code>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)
  </code></pre>
  
  <p><a href="http://nekaka.com/d/plhYOJ82y0" rel="nofollow noreferrer">Here's the activity log</a></p>
  
  <p>Error message when I try to create a new <code>LineGraphControl</code>:</p>
  
  <p><img src="https://i.stack.imgur.com/bsYup.png" alt="enter image description here"></p>
  
  <p>The ProcMon extract:</p>
  
  <p><img src="https://i.stack.imgur.com/zT5Rt.png" alt="enter image description here"></p>