title: Custom SSIS Task Failing To Load. How Do I Troubleshoot?
body: <p>I built a custom SSIS task that wraps an old program to allow it being called automatically.</p>
  
  <p>Recently, I've been having problems with the task ! It seems that when scheduled 
  to automatically run, the custom task is failing validation with the message:</p>
  
  <p>"Task failed to load"</p>
  
  <p>My task's <code>Execute</code> method looks something like this:</p>
  
  <pre><code>Public Overrides Function Execute(connections As Connections, 
  variableDispenser As VariableDispenser, componentEvents As 
  IDTSComponentEvents, log As IDTSLogging, transaction As Object) 
  As DTSExecResult
  
          Dim objApp = CreateObject("MyProgram")
  
          Try
              objApp.ExecuteSomeStuff()
          Finally
              objApp.Exit()
          End Try
  
          Return DTSExecResult.Success
  
      End Function
  </code></pre>
  
  <p>I also implemented a custom UI, with a custom icon</p>
  
  <p>Any reason why this might be happening? What can I do to troubleshoot this?</p>