title: Referencing .NET Assembly in VB6 won't work
body: <p>I wrote a .net assembly using c# to perform functions that will be used by both managed and unmanaged code.  I have a VB6 project that now needs to use the assembly via COM.</p>
  
  <p>I created my .net assembly, made sure that ComVisible is set to true and that it is registered for COM interop via project properties.</p>
  
  <pre><code>public class MyClass
  
      [ComVisible(true)]
      public string GetResponse()
      {
          return "Testing Response"
      }
  
  }
  </code></pre>
  
  <p>I build the assembly and copied the file into a folder.  TestInterop.dll</p>
  
  <p>I then run a batch file to register the assembly tool to register the object for COM.  </p>
  
  <pre><code>cd C:\Windows\Microsoft.NET\Framework\v4.0.30319\
  regasm "c:\Program Files\TestApp\TestInterop.dll" /tlb:TestInterop.tlb
  </code></pre>
  
  <p>I open a new VB6 application and reference TestInterop.dll</p>
  
  <p>In VB6 I write the following code and it compiles.</p>
  
  <pre><code>Dim obj as TestInterop.MyClass
  Set obj = new TestInterop.MyClass
  
  Dim strTest as string
  
  strTest = obj.GetRespose()
  </code></pre>
  
  <p>When I run the program it errors on the obj.GetResponse() line.  </p>
  
  <pre><code>Run-time error' -2147024894 (80070002'):
  Automation error
  The system cannot find the file specified
  </code></pre>
  
  <p>Also, the intellesense does not work on obj.  I had to type the <code>GetResponse</code> method.  Is this normal?</p>
  
  <p>Does anyone have any clue what could be wrong or what steps I missed.  Thanks!</p>