microsoft / vs-azure-iot-edge-docs

Documentation for Azure IoT Edge Tools for Visual Studio
Creative Commons Attribution 4.0 International
5 stars 6 forks source link

Please add support for IoT Edge Runtime 1.4 to the Azure IoT Edge Tools for VS 2022 #43

Open miniGweek opened 1 year ago

miniGweek commented 1 year ago

Problem statement:

Microsoft has released azure IoT Edge Runtime v1.4 ( LTS ) https://github.com/Azure/azure-iotedge/releases/tag/1.4.1 Azure IoT Edge Tools for VS 2022 does not support debugging C# IoT Edge Modules using IoT Edge Runtime version 1.4

Expected Behavior

In Visual Studio 2022, when I right-click on the Edge module deployment project, Select Set IoT Edge Runtime Version Expect to see 1.4 as one of the IoT Edge Runtime version After selecting this, I should be able to debug the C# IoT Edge Module.

Current Behavior

  1. Only IoT Edge Runtime version 1.0, 1.1 and 1.2 are available for selection.

img

  1. Also, if I manually set DEFAULT_RT_IMAGE=1.4 ( in the .env file ) it throws error.

img

konichi3 commented 1 year ago

Hi @miniGweek

Thank you very much for the feedback. The request will be in our backlog and we will respond when we have an update on the request.

Meanwhile, you can follow this new documentation we recently published to set IoT Edge runtime by manually updating the deployment manifest.

chatnoir1982 commented 1 year ago

Hi @konichi3 ,

I am getting the same error, but v1.4 is the only option I see when I try to set the IotEdge runtime version in VS 2022: The installed version for the AZ IoT Edge tools for VS 2022 Extension is 2.0.8.

image

It's worth mentioning that the issue started after I migrated from another machine to the current one that exhibits this behavior. On the old machine everything worked (extension version was 2.0.7).

To set up my environment, I followed these instructions.

Debugging the solution outputs the error:

IoT Hub edge module xxxxxxxxxxxxx is using \"input1\" as inputs C:\Users\xxxxxxxx\Documents\Visual Studio 2022\iotedgehubdev\v0.14.18\iotedgehubdev.exe modulecred -l -m "target" EdgeHubConnectionString=HostName=xxxxxxxxxxxxxx.azure-devices.net;GatewayHostName=localhost;DeviceId=xxxxxxxxxxxxx;ModuleId=target;SharedAccessKey=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx EdgeModuleCACertificateFile=C:\Users\xxxxxxxx\AppData\Local\.iotedgehubdev\data\certs\edge-device-ca\cert\edge-device-ca.cert.pem DOCKER_HOST: DOCKER_TLS_VERIFY: DOCKER_CERT_PATH: Additional Env Variables: C:\Users\xxxxxxxx\Documents\Visual Studio 2022\iotedgehubdev\v0.14.18\iotedgehubdev.exe start -er "1.4" -i "input1" ERROR: -edge-runtime-version1.4is not valid. [ERROR]: Failed to run 'iotedgehubdev start -er "1.4" -i "input1"' with error: ERROR: -edge-runtime-version1.4is not valid.

I tried uninstalling and reinstalling the extension from VS, same behavior. Ideas?

chatnoir1982 commented 1 year ago

Manually changing the version in the deployment template allows me to debug. Solved.