Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting "IOTEDGE_WORKLOADURI is required." exception while debugging IoT edge solution locally

I' following this article to develop an IoT edge solution. But while debugging I'm getting the following error:

Unhandled Exception: System.AggregateException: One or more errors occurred. (Environment variable IOTEDGE_WORKLOADURI is required.) ---> System.InvalidOperationException: Environment variable IOTEDGE_WORKLOADURI is required.at Microsoft.Azure.Devices.Client.Edge.EdgeModuleClientFactory.CreateInternalClientFromEnvironmentAsync()
   at SampleModule.Program.Init() in D:\IoT Arch POC\EdgeSolution2\modules\SampleModule\Program.cs:line 49

Found one post in git hub, but that is not helpful, this

like image 456
Alex Avatar asked Aug 31 '25 03:08

Alex


1 Answers

You are probably trying to run an Iot-Edge Module as a stand alone C# program? That won't work. An IoT-Edge Module must be run in the IoT-Edge or IoT-Edge simulator.

like image 78
GGleGrand Avatar answered Sep 04 '25 09:09

GGleGrand