What is a Component ID?

Every Azure Sphere application must have a unique component ID so it can be easily identified. The component ID is a universally unique identifier (UUID) also known as globally unique identifier (GUID) which is a string that contains a set of hexadecimal digits. For example, 02ce3860-3126-42af-8ac7-c2a661134129. Each application has a different component ID to avoid possible conflicts.

Generate a component ID

The first time you open a CMake project in Visual Studio or Visual Studio Code, CMakeLists generation automatically runs and sets the component ID for the application in the app_manifest.json file. If you run the application without a component ID, the build fails. If required, you can manually generate a GUID/UUID and update the application manifest setting.

To generate a GUID or UUID:

  1. On the Tools menu, choose Create GUID.
  2. In the GUID generator program, choose the Registry Format option button, choose the Copy button, and then choose the Exit button.

Paste the generated GUID/UUID in the ComponentId field of the application's app_manifest.json file. For example: "ComponentId": "a5e23798-9bef-4bb0-9ae9-45643e788cb7"

Find the component ID

The component ID of an application is required for identifying an application. You can find the component ID for an application in any the following ways: