About the operation after installing the app created by Azure IoT Hub SDK

ima 31 Reputation points
2020-12-21T06:47:35.91+00:00

When I create an application that runs with administrator privileges created using the Azure IoT Hub SDK and its installer, and after installation, I run the application and send it to Azure IoT Hub, I get "Object reference not set for object instance". An error will occur.
There is no problem if run it in Visual Studio 2019.
I don't know why the error occurs when the application is installed by the installer.

Azure IoT SDK
Azure IoT SDK
An Azure software development kit that facilitates building applications that connect to Azure IoT services.
228 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sander van de Velde | MVP 36,761 Reputation points MVP Volunteer Moderator
    2020-12-21T14:29:51.807+00:00

    Well, that seems you are missing the https://www.nuget.org/packages/Microsoft.Azure.Devices.Client Nuget package DLL in the folder of your installer.

    Can you double-check if this DLL (and all related dependencies) are available for your app?

    eg. A .net app without the nuget package:

    49897-image.png

    And with the Microsoft azure devices client Nuget added (including dependencies):

    49927-image.png


Your answer

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