Exercise - Create a second simulated device

Completed

In this exercise, you make copies of your simulated device project, and then update your code to use the different device certificates that you created and added to the project folder.

Task 1: Make copies of your code project

  1. In Visual Studio Code or your file explorer, copy the ContainerDevice.csproj and Program.cs files from sensor-thl-001-device folder into the sensor-thl-002-device folder.

  2. In both files, replace the certificate file name to match the certificate file in this folder: sensor-thl-002-device.cert.pfx.

  3. Save your changes.

If you want to create more devices to enroll with your DPS instance, you can do so by creating a new device certificate and repeating these steps.

Verify your work

  1. Navigate your file manager to the sensor-thl-002-device folder.
  2. Verify that the files contained in the sensor-thl-002-device folder match the changes you made in task 1 of this unit.