title: Retrieving COM class factory failed error: 80040154
body: <p>Thank you for reading.     </p>
  
  <p>I am working on developing a piece of code which executes within and accesses data from a commercial radiation planning software (Eclipse). 
  I'm attempting to have this application.exe also update some model parameters within a SolidWorks model. </p>
  
  <p>Here's the problem:
  When attempting to open the SolidWorks application (SldWorks swApp = new SldWorks(); ) i get an error: "Retrieving the COM class factory for component with CSLID {xxx-xxx-xxx} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))." </p>
  
  <p>I have also attempted the methods described here:</p>
  
  <p><a href="https://www.codestack.net/solidworks-api/getting-started/stand-alone/" rel="nofollow noreferrer">https://www.codestack.net/solidworks-api/getting-started/stand-alone/</a><br>
  After attempting these methods, I receive again the same error.</p>
  
  <p>I understand that this means that the application is attempting to access something in the registry that isn't there, but it isn't clear what I should do to remedy this.     </p>
  
  <p>I am running Solidworks 2018 in Windows 7, using Visual Studio Community 2017 as my editor.  The piece of code works on its own, and I believe I have all of the relevant Solidworks .dll's referenced properly in my model. Interestingly, if i run the same code as a .dll from within Visual Studio, Solidworks will actually open. This is done using the "SldWorks swApp = new SldWorks();" methodology (which is a part of the Solidworks API methods)</p>
  
  <p>I have no build errors in my solution.  I apologize if there is anything confusing in this, as I am new to C# and these APIs. I will do my best to clarify any questions.     </p>
  
  <p>I have attempted the methods here:
  <a href="https://stackoverflow.com/questions/44618287/c-dll-is-registered-but-com-error-80040154-still-appear">C#: DLL is registered but COM error 80040154 still appear</a> to no avail.
  Any help is greatly appreciated!<br>
  Thank you!</p>