How to run the device app in Azure IoT Central

Mark B 31 Reputation points
2021-11-08T18:57:44.403+00:00

I'm doing my first IoT Central device. Currently on [this][1] tutorial page, asking to run the device app. When the two commands are run (Go to customer & Recall) I get:
Error
The device was not found when trying to executing the command. Check if it is Provisioned.
Error code: 404.070.024.001 / ioqbmkh8dt.41

Then, In the terminal, enter dotnet run. I get:
error CS0234: The type or namespace name 'Azure' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)

I followed the tutorial exactly.
Any advise on what to do next?

Azure IoT Central
Azure IoT Central
An Azure hosted internet of things (IoT) application platform.
{count} votes

Answer accepted by question author
  1. Sander van de Velde | MVP 36,961 Reputation points MVP Volunteer Moderator
    2021-11-12T16:36:42.807+00:00

    Hello @Mark B ,

    I have looked into the MS Learn module named "Create your first Azure IoT Central app".

    I uses the VS Code-C# variant and I was a bit lazy so I copied the program.cs code from this GitHub location as advertised in the tutorial...

    My device is able to provision and I see incoming data:

    148868-image.png

    I can input customer 1 and app is not crashing:

    148869-image.png

    Also, a recall works for me:

    148840-image.png

    Regarding the issue you have, there are two options:

    1. Double-check for a mistype in the device template (probably the commands)
    2. Try the same app using that prewritten program.cs from GitHub

    If you are using one of the other options, feel free to try the other prewritten files.

    Do not forget to fill in the secrets of both the device and azure maps into the source code.

    0 comments No comments

0 additional answers

Sort by: Most helpful

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.