Renaming modules in IoT Edge development

Pritam Chanda 45 Reputation points
2024-08-22T09:47:59.58+00:00

I am following this Microsoft Learn document to develop IoT Edge modules using C#. I have created two modules successfully, but now I want to rename the filtermodule to a samplemodule. Is it enough to rename the file or should I change it somewhere else as well?

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.
567 questions
Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,176 questions
0 comments No comments
{count} votes

Accepted answer
  1. Sedat SALMAN 13,740 Reputation points
    2024-08-23T20:58:59.98+00:00

    When renaming a module in IoT Edge development, it's not enough to simply rename the file. You should also update the module name in several places to ensure everything works correctly:

    • Rename the directory of your module to reflect the new name.
    • Inside your module's folder, update the name in the module.json file to match the new module name.
    • Make sure to update the module name wherever it appears in your deployment.template.json file.
    • If your code references the module by name, update those references as well.
    • After renaming and updating the references, rebuild and redeploy your IoT Edge solution.

    please follow all steps and revert back

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.