Skip to content

Commit

Permalink
Revert "fix: samples arguments and remove 1 more dead link (#1785)"
Browse files Browse the repository at this point in the history
This reverts commit 43ffebd.
  • Loading branch information
abhipsaMisra authored Mar 19, 2021
1 parent 896239c commit 0c07428
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions iothub/device/samples/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@ This folder contains simple samples showing how to use the various features of M
- [Plug and Play device samples][d-pnp-sample]
- [Xamarin sample][d-xamarin-sample]

### Module sample
### [Module samples][module-samples]

- [Message sample][m-message-sample]
- This sample illustrates how to write an IoT Hub module to handle connection issues, connection-related exceptions, and how to manage the lifetime of the `ModuleClient`
- Includes sending messages and symmetric key failover
- [Twin sample][m-twin-sample]

### Prerequisites

Expand All @@ -42,24 +41,22 @@ You need to clone the repository or download the sample (the one you want to try

#### Build and run the samples

1. Building the sample application
1. Preparing the sample application:
1. Set the following environment variables on the terminal from which you want to run the application.

- IOTHUB_DEVICE_CONNECTION_STRING

1. Building the sample application:

To build the sample application using dotnet, from terminal navigate to the sample folder (where the .csproj file lives). Then execute the following command and check for build errors:

```console
dotnet build
```

1. Preparing the sample application:
1. Many of these samples take parameters. To see the parameters required, type:

```console
dotnet run --help
```

1. Running the sample application:

To run the sample application using dotnet, execute the following command with any required parameters discovered in the previous step.
To run the sample application using dotnet, execute the following command.

```console
dotnet run
Expand All @@ -76,7 +73,9 @@ You need to clone the repository or download the sample (the one you want to try
[d-pnp-sample]: https://github.com/Azure-Samples/azure-iot-samples-csharp/tree/master/iot-hub/Samples/device/PnpDeviceSamples
[d-xamarin-sample]: https://github.com/Azure-Samples/azure-iot-samples-csharp/tree/master/iot-hub/Samples/device/XamarinSample

[m-message-sample]: https://github.com/Azure-Samples/azure-iot-samples-csharp/tree/master/iot-hub/Samples/module/ModuleSample
[module-samples]: https://github.com/Azure-Samples/azure-iot-samples-csharp/tree/master/iot-hub/Samples/module
[m-message-sample]: https://github.com/Azure-Samples/azure-iot-samples-csharp/tree/master/iot-hub/Samples/module/MessageSample
[m-twin-sample]: https://github.com/Azure-Samples/azure-iot-samples-csharp/tree/master/iot-hub/Samples/module/TwinSample

[lnk-setup-iot-hub]: https://aka.ms/howtocreateazureiothub
[lnk-manage-iot-device]: https://github.com/Azure/azure-iot-device-ecosystem/blob/master/setup_iothub.md#create-new-device-in-the-iot-hub-device-identity-registry

0 comments on commit 0c07428

Please sign in to comment.