我正在关注 this article开发物联网边缘解决方案。但是在调试时出现以下错误:
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
在 git hub 中找到一个帖子,但这没有帮助,this
最佳答案
将以下内容添加到您的 .csproj 文件中:
<ItemGroup>
<ProjectCapability Include="AzureIoTEdgeModule" />
</ItemGroup>
关于azure-iot-edge - 在本地调试 IoT 边缘解决方案时出现 "IOTEDGE_WORKLOADURI is required."异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59847753/