title: Debugging VB6 project that calls a .Net(C#) dll
body: <p>I have been stump in this problem for a few hours now. I hope someone has had a similar problem to this.</p>
  
  <p>We have developed a prototype .Net(C#) dll using VS2010, and would like to be able to call this dll in a both C# applications and VB6 application.</p>
  
  <p>My question is:</p>
  
  <p><strong>Is it possible to debug a VB6 application that is calling a .Net dll? I get an error message "<em>Automation Error The system cannot find the file specified</em>"</strong></p>
  
  <p>The error message suggests that there is something missing for my VB6 app to find the .Net dll.</p>
  
  <p>I am aware that if the VB6 application has been compiled, and the .exe has been created,  the VB6 will successfully call the .Net dll functionality when using the .exe</p>
  
  <p>However it is important that we can debug through our VB6 application. Unfortunately debugging does not allow you to step over the line of code instantiating the .Net DLL's class object. I can't seem to do this.</p>
  
  <p>NOTE: I have looked around forums and MSDN documentation and I mostly find solution for calling a VB6 dll in .NET; which is unfortunately the opposite of what we need to do.</p>
  
  <p>NOTE: I have already registered the compiled .Net(C#) assembly, and referenced it in the VB6 project.</p>
  
  <p>I have however found these two pages, which seemed to be what we need, but its a solution for calling a .NET(c#) dll generated using VS2005. This doesnt seem to work when the .NET(C#) dll was generated using VS2010.</p>
  
  <p><a href="http://blogs.msdn.com/b/bethmassi/archive/2007/07/03/debugging-hybrid-vb6-net-applications.aspx" rel="noreferrer">site1</a>
  <a href="http://msdn.microsoft.com/en-us/library/aa730840%28v=vs.80%29.aspx#dbughybvb6_topic3" rel="noreferrer">site2</a></p>
  
  <p>If someone could give any suggestions or direct me somewhere I can get one, that would be great.</p>
  
  <p>Thanks</p>
  
  <p><strong>SOLUTION</strong>
  Thanks to @HansPassant, I have found the solution.
  To debug a VB6 project that contains a C# .NET assembly, you need to register the .NET dll through both "<em>regasm</em>" and "<em>gacutil</em>", then make sure to close and reopen the VB6 application before you start debugging. </p>