title: Debug dynamically loaded assembly
body: <p>I am debugging an assembly which I loaded dynamically with <a href="http://msdn.microsoft.com/en-us/library/aa329934%28v=VS.71%29.aspx" rel="nofollow">Assembly.Load(Byte[])</a>, but I am facing some problems. </p>
  
  <p>First of all, I can't move the yellow arrow in Visual Studio 2010 to step into other lines of code, and also I am getiing exceptions ("Cannot find the method on the object instance.") when trying to do a quick watch on objects from a third party library (controls from Infragistics for example.)</p>
  
  <pre><code>Dim data = My.Computer.FileSystem.ReadAllBytes(file.FullName)
  Assembly.Load(data)
  </code></pre>
  
  <p>When using <a href="http://msdn.microsoft.com/en-us/library/aa329935%28v=VS.71%29.aspx" rel="nofollow">Assembly.Load(String)</a>, everything works fine, and there are no problems.</p>
  
  <pre><code>Assembly.Load(IO.Path.GetFileNameWithoutExtension(file.Name))
  </code></pre>
  
  <p>Any idea why the behaviour is that much different? Anyway to fix this?</p>
  
  <p>I tried loading the debugging symbols for my assembly with Assembly.Load(byte[]. byte[]), but I still get exceptions when trying to debug objects from third party libraries.</p>