title: VB The object invoked has disconnected from its clients
body: <p>I have a console app that interacts with internet explorer to do a few things.</p>
  
  <p>Basically, the app runs perfectly normal in debug/release mode out of VS 2015 professional.</p>
  
  <p>Once published in debug or release mode as an exe, I get the error you see in the post title.</p>
  
  <p>Does anyone have experience with this happening?</p>
  
  <p>Thank you in advanced.</p>
  
  <p><a href="https://i.stack.imgur.com/rWunU.jpg" rel="nofollow noreferrer">enter image description here</a></p>
  
  <p>I wanted to also add that when the program first starts after being published it works, it uses a .dll from a class library I made in another project it gets the internet explorer makes it visible then fails.</p>
  
  <pre><code>  Public Shared Function func_getIe(strIntialUrl As String) As InternetExplorer
  
      Dim ie As InternetExplorer
  
      ie = New InternetExplorer
      ie.Visible = True
      ie.Navigate(strIntialUrl)
      While ie.ReadyState &lt;&gt; 4
      End While
      Return ie
  End Function
  </code></pre>
  
  <p>That is the code from one part of the  .dll that is almost the very first thing, aside from some variable declaration in the beginning of the Main().</p>