Q:

Getting Error Retrieving the COM class factory for component with CLSID{}

when i want to add the new customer on quick book through c#.i am getting  this error:
Retrieving the COM class factory for component with CLSID {178AACCA-9DCE-42A0-A193-CF4985B930E5} failed due to the following error: 80040154.  
here is a code where i found error..
Please write valid answer... thanks..
       try
        {

            //Create the session Manager object
            sessionManager = new QBSessionManager();

            //Create the message set request object to hold our request  
            IMsgSetRequest requestMsgSet = sessionManager. CreateMsgSetRequest("US", 8, 0);
            requestMsgSet. Attributes. OnError = ENRqOnError.roeContinue;

            //Connect to QuickBooks and begin a session
            sessionManager. OpenConnection("App1", "QuickBooks");
            connectionOpen = true;
            sessionManager. BeginSession(@"C:\Users\Public\Documents\Intuit\QuickBooks\Company Files\PSNew. QBW", ENOpenMode.omDontCare);
            sessionBegun = true;

            ICustomerAdd customerAddRq = requestMsgSet. AppendCustomerAddRq();
            customerAddRq. Name. SetValue(CP.CustomerName);
            customerAddRq. LastName. SetValue(CP.CustomerLastName);
            customerAddRq. Email. SetValue(CP.CustomerEmail);

            //Send the request and get the response from QuickBooks
            IMsgSetResponse responseMsgSet = sessionManager. DoRequests(requestMsgSet);
            IResponse response = responseMsgSet. ResponseList. GetAt(0);
            ICustomerRet customerRet = (ICustomerRet)response. Detail;

            CP.GetCustomerId = customerRet. ListID.GetValue();
            CP.GetCustomerName = customerRet. Name. GetValue();
            CP.GetCustomerEmail = customerRet. Email. GetValue();
            //CP.customerAddRq1 = customerAddRq. Name. GetValue();
        }

        catch (Exception)
        {
            throw;
        }
        finally
        {
            //End the session and close the connection to QuickBooks
            if (sessionBegun)
            {
                sessionManager. EndSession();
            }

            if (connectionOpen)
            {
                sessionManager. CloseConnection();

            }

A:

make sure that your app is compiled with the project build configurations set to x86 for the target platform.  This is the most common solution on the net given that Intuit integration dlls are 32-bit.  However in my case when I faced this problem, I decided to install the QuickBooks SDK to the client machine and that's when I succeeded in solving it.