azure-iot-edge - 在本地调试 IoT 边缘解决方案时出现 "IOTEDGE_WORKLOADURI is required."异常

标签 azure-iot-edge

我正在关注 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/

相关文章:

java - 如何使用 Azure Java SDK 发送和接收消息

c# - "SetCertificatePath"C# 物联网设备客户端中的选项

Azure IoT Edge 和证书

azure - 尝试将 docker 推送到 Azure 容器注册表时出现 "unauthorized: authentication required"

azure - 当前物联网边缘解决方案的应用程序洞察集成最佳实践

azure - 使用代码更改edgeAgent和edgeHub的 'createOptions'

c# - 有没有办法使用 azure iot Edge sdk 从 ModuleClient 获取设备孪生

修改基础部署后,不会重新应用 Azure 边缘分层部署

azure - 代表 Azure IoT 中心上的其他设备

c# - IoT Edge SendEventBatchAsync