Skip to content

Troubleshoot

Renlong Tu edited this page Nov 15, 2019 · 3 revisions

This page is for troubleshooting Azure IoT Edge Tools for Visual Studio instead of IoT Edge itself, please refer to IoT Edge Troubleshoot if it is IoT Edge issues.

1. "Permission denied" errors

  • If getting error like "[Errno 13] Permission denied: 'C:\ProgramData\iotedgehubdev\data\data\docker-compose.yml'", it probably means you install iotedgehubdev or Setup IoT Edge Simulator/Setup IoT Edge Device Connection String using administrator, so you need Run Visual Studio as Administrator.

  • If getting error like "Bind for 0.0.0.0:8883: unexpected error Permission denied", it means port 8883 is already in use, probably you doesn't stop container edgeHubDev in another Docker engine on your dev machine, so you need switch to other Docker engine and stop/prune IoT Edge related container/image/volume, then switch back again.

2. Microsoft.VisualStudio.Azure.IoT.Edge.MSBuildTasks package is not restored successfully for IoT Edge project .iotedgeproj

You may right click on the solution and click Restore NuGet Packages to restore package, and you also need to Reload Project to make it take effect. If you don't install this package successfully, you may error "Object reference not set to an instance of an object" when opening Properties of IoT Edge project

3. 'An item with the caption "***" already exists in the tree with the same sort order as the item being added.' error

When you use 0.5.* to open project created by previous versions, you may get the error 'An item with the caption "***" already exists in the tree with the same sort order as the item being added.', you can safely first click OK, then unload and reload .iotedgeproj, everything should work well.

4. Docker build fails - when reference library/shared code in project/solution

If your module project reference other library/shared project in your solution, when you try to build docker image, you may get errors: "The referenced project '../XXXXX.csproj' does not exist.", you should open module.json file in the Edge Module project, and change the context Path to "../"

Then you should modify your Dockerfile and copy the related lib/project to the container.

Here is an sample project you can refer: https://github.com/Azure/iotedge/files/3759820/SampleEdgeProjectWithCSharpLibary.zip

Clone this wiki locally