Share via

.NET Published App Crashes while calling Activex DLL method, works in Debug

Anvaya Tech 1 Reputation point
2021-12-26T05:02:02.927+00:00

Hi,

We are building an integration with QuickBooks desktop (2021 Pro). Following their documentation, we added a reference to their ActiveX dll (Interop.QBFC15). Everything works well in debug, and even if you build a release and run it directly (without install).

However, if you publish the app (VS Studio => Build => Publish), and install it, the application crashes the moment you attempt to call the first method.

    QBSessionManager manager = new QBSessionManager();
    manager.OpenConnection("", "TEST APP");  //Crashes on this line.

This is bizzare, its the same computer, even the release version app works fine, however the published and installed one crashes. Try/catch blocks do not work, no error is raised.

The application gets installed to: C:\Users\<user>\AppData\Roaming\Microsoft\Windows\Start Menu\Program. There is no way in setup to change the location. We even tried that as well, copied the exe to another folder and ran, it still crashes.

How to identify and resolve this issue?

Developer technologies | C#
Developer technologies | C#

An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.