Sage 50 US API error: “Sage.Peachtree.CollectData.pdb not loaded”

SUGGESTED

I am not sure if this is the right place to post this. I've already sent an email to Developer Support, but they replied and said they weren't the right people to contact. I'm just looking for some help, please direct me to the right place if this isn't it. 

I am a developer and I am working on an interface between my company's application and the Sage 50 Accounting (US) desktop application that would allow our customers to send General Ledger journal entries from our application to their Sage desktop application. 

I have actually been able to successfully accomplish this, however the issue occurs after ending the API session (calling the PeachtreeSession.End() method). After executing this line of code, it throws an error “Sage.Peachtree.CollectData.pdb not loaded”.

I was able to replicate the problem using your Sample Sage 50 SDK Application (BasicSDKApp.sln). I connect to Sage using my Application ID, open a company, then after I close the session it throws this same error. So this confirms the error is unrelated to my application and is coming from Sage itself. 

I have tried completely uninstalling the Sage application from my computer, reinstalling it, setting up a brand new company from scratch, but I am still encountering this issue.

Any advice or guidance is much appreciated.

        protected static void CloseSession(PeachtreeSession apiSession)
        {
            try
            {
                if (apiSession != null)
                {
                    apiSession.End();
                    apiSession.Dispose();
                }
            }
            catch (Exception)
            {

            }
        }
2072.Sage50Error.docx