title: How to reference COM lib like shdocvw using vbc commandline compiler (no IDE)?
body: <p>The basis of this question comes from this tutorial on support.microsoft.com:
  <a href="http://support.microsoft.com/kb/176792" rel="nofollow">http://support.microsoft.com/kb/176792</a></p>
  
  <pre><code>To run the following code, it is necessary to add a reference to
  "Microsoft Internet Controls" (Shdocvw.dll) and "Microsoft HTML Object
  Library" (Mshtml.dll) to the Visual Basic project:
  Dim SWs As New SHDocVw.ShellWindows 
  Dim IE As SHDocVw.InternetExplorer
  </code></pre>
  
  <p>This works fine in Visual Studio 2010, but it seems to rely on some behind-the-scenes magic that I can't duplicate using the straight commandline vbc compiler.</p>
  
  <p>Obviously there is no "Add Reference" dialog for the commandline compiler. I naively tried adding:</p>
  
  <p><strong>/reference:"C:\windows\system32\shdocvw.dll"</strong></p>
  
  <p>to the commandline, but that didn't help. In both cases, I get:</p>
  
  <p><strong>error BC30002: Type 'SHDocVw.ShellWindows' is not defined.</strong></p>
  
  <p><strong>error BC30002: Type 'SHDocVw.InternetExplorer' is not defined.</strong></p>
  
  <p>I've successfully used shdocvw.dll, AKA Shell.Application, from other languages like vbscript and autohotkey, but I currently have too little understanding of VB.NET to know whether I'm just doing it wrong or it's not possible.</p>