Cannot create C# iot edge module in vscode

Deicha Andreas 11 Reputation points
2022-04-27T10:01:30.537+00:00

When I try to create a C# module in vscode using ctrl+shift+p and 'Azure IoT Edge: Add IoT Edge Module', I get the following error message:

Running Docker version
Client:
Cloud Integration: v1.0.23
Version: 20.10.14
API version: 1.41
Go version: go1.16.15
Git commit: a224086
Built: Thu Mar 24 01:53:11 2022
Operating system/Arch: windows/amd64
Context: standard
Experimental: true

Server: Docker Desktop 4.7.1 (77678)
Engine:
Version: 20.10.14
API version: 1.41 (minimum version 1.12)
Go version: go1.16.15
Git commit: 87a90dc
Built: Thu Mar 24 01:46:14 2022
Operating system/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.5.11
GitCommit: 3df54a852345ae127d1fa3092b95168e4a88e2f8
runc:
Version: 1.0.3
GitCommit: v1.0.3-0-gf46b6ba
docker-init:
Version: 0.19.0
GitCommit: de40ad0
The specified iotedgehubdev version is: 0.14.14
azure-iot-edge.buildAndRunSolution:
azure-iot-edge.setupIotedgehubdev:
azure-iot-edge.buildAndRunSolution: azure-iot-edge.buildAndRunSolution:
azure-iot-edge.addModule:
Running dotnet new -i Microsoft.Azure.IoT.Edge.Module::3.0.0-alpha
The following template packages will be installed:
Microsoft.Azure.IoT.Edge.Module::3.0.0-alpha

"Microsoft.Azure.IoT.Edge.Module::3.0.0-alpha" is already installed.
Error: Please make sure that the prerequisites for the C# module are installed. Error: command failed with exit code 2147614729. Detail: "Microsoft.Azure.IoT.Edge.Module::3.0.0-alpha" is already installed.

azure-iot-edge.addModule:
Run dotnet new -i Microsoft.Azure.IoT.Edge.Module::3.0.0-alpha.
The following template packages are installed:
Microsoft.Azure.IoT.Edge.Module::3.0.0-alpha

"Microsoft.Azure.IoT.Edge.Module::3.0.0-alpha" is already installed.
Error: Please make sure that the prerequisites for the C# module are installed. Error: command failed with exit code 2147614729. Detail: "Microsoft.Azure.IoT.Edge.Module::3.0.0-alpha" is already installed.

I checked again to make sure all the prerequisites are installed correctly. According to Azure IoT Edge for Visual Studio code documentation, the following must be met.

  • .NET Core 2.1 SDK or higher. (.NET Core 3.0 SDK or higher is required for ARM64 (Preview) support. Please see the instructions here for more details).
  • C# for Visual Studio Code (powered by OmniSharp) Extension
  • Requirements for the Azure IoT Edge extension --> which are (Docker, Python and Pip and iotedgehubdev)

.Net Core 2.1 SDK >
196876-image.png

C# for Visual Studio Code
196926-image.png

Docker
196900-image.png

Python and Pip
196952-image.png

iotedgehubdev
196971-image.png

Can anybody help?

Azure IoT Edge
Azure IoT Edge
An Azure service that is used to deploy cloud workloads to run on internet of things (IoT) edge devices via standard containers.
534 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Deicha Andreas 11 Reputation points
    2022-04-27T14:38:32.57+00:00

    I solved it

    first updated to 3.1.1:
    dotnet new --install Microsoft.Azure.IoT.Edge.Module::3.1.1

    vscode restart
    dotnet new aziotedgemodule -n "YourModuleName" -r localhost:5000/YourModuleName

    2 people found this answer helpful.