Skip to content

Commit 189de97

Browse files
committed
Replaced the Program.cs file name
1 parent ad2e07b commit 189de97

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

articles/iot-edge/how-to-visual-studio-develop-module.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ Now, you have an IoT Edge project and an IoT Edge module in your Visual Studio s
127127

128128
In your solution, there are two project level folders including a main project folder and a single module folder. For example, you may have a main project folder named *AzureIotEdgeApp1* and a module folder named *IotEdgeModule1*. The main project folder contains your deployment manifest.
129129

130-
The module project folder contains a file for your module code named either `program.cs` or `main.c` depending on the language you chose. This folder also contains a file named `module.json` that describes the metadata of your module. Various Docker files included here provide the information needed to build your module as a Windows or Linux container.
130+
The module project folder contains a file for your module code named either `ModuleBackgroundService.cs` or `main.c` depending on the language you chose. This folder also contains a file named `module.json` that describes the metadata of your module. Various Docker files included here provide the information needed to build your module as a Windows or Linux container.
131131

132132
### Deployment manifest of your project
133133

@@ -188,7 +188,7 @@ Currently, the latest stable runtime version is 1.4. You should update the IoT E
188188

189189
## Module infrastructure & development options
190190

191-
When you add a new module, it comes with default code that is ready to be built and deployed to a device so that you can start testing without touching any code. The module code is located within the module folder in a file named `Program.cs` (for C#) or `main.c` (for C).
191+
When you add a new module, it comes with default code that is ready to be built and deployed to a device so that you can start testing without touching any code. The module code is located within the module folder in a file named `ModuleBackgroundService.cs` (for C#) or `main.c` (for C).
192192

193193
The default solution is built so that the simulated data from the **SimulatedTemperatureSensor** module is routed to your module, which takes the input and then sends it to IoT Hub.
194194

@@ -233,7 +233,7 @@ Typically, you'll want to test and debug each module before running it within an
233233

234234
1. Set a breakpoint to inspect the module.
235235

236-
* If developing in C#, set a breakpoint in the `PipeMessage()` function in **Program.cs**.
236+
* If developing in C#, set a breakpoint in the `PipeMessage()` function in **ModuleBackgroundService.cs**.
237237
* If using C, set a breakpoint in the `InputQueue1Callback()` function in **main.c**.
238238

239239
1. Test the module by sending a message. When debugging a single module, the simulator listens on the default port 53000 for messages. To send a message to your module, run the following curl command from a command shell like **Git Bash** or **WSL Bash**.
@@ -289,7 +289,7 @@ After you're done developing a single module, you might want to run and debug an
289289

290290
1. Set a breakpoint to inspect the modules.
291291

292-
* If developing in C#, set a breakpoint in the `PipeMessage()` function in **Program.cs**.
292+
* If developing in C#, set a breakpoint in the `PipeMessage()` function in **ModuleBackgroundService.cs**.
293293
* If using C, set a breakpoint in the `InputQueue1Callback()` function in **main.c**.
294294

295295
1. Create breakpoints in each module and then press **F5** to run and debug multiple modules simultaneously. You should see multiple .NET Core console app windows, with each window representing a different module.

articles/iot-edge/tutorial-csharp-module.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Currently, Visual Studio Code can develop C# modules for Linux AMD64 and Linux A
104104

105105
### Update the module with custom code
106106

107-
1. In the Visual Studio Code explorer, open **modules** > **CSharpModule** > **Program.cs**.
107+
1. In the Visual Studio Code explorer, open **modules** > **CSharpModule** > **ModuleBackgroundService.cs**.
108108

109109
1. At the top of the **CSharpModule** namespace, add three **using** statements for types that are used later:
110110

@@ -248,7 +248,7 @@ Currently, Visual Studio Code can develop C# modules for Linux AMD64 and Linux A
248248
}
249249
```
250250

251-
1. Save the Program.cs file.
251+
1. Save the ModuleBackgroundService.cs file.
252252

253253
1. In the Visual Studio Code explorer, open the **deployment.template.json** file in your IoT Edge solution workspace.
254254

articles/iot-edge/tutorial-develop-for-linux-on-windows.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ The IoT Edge project template in Visual Studio creates a solution that can be de
233233
234234
Now, you have an IoT Edge project and an IoT Edge module in your Visual Studio solution.
235235
236-
The module folder contains a file for your module code, named either `program.cs` or `main.c` depending on the language you chose. This folder also contains a file named `module.json` that describes the metadata of your module. Various Docker files provide the information needed to build your module as a Windows or Linux container.
236+
The module folder contains a file for your module code, named either `ModuleBackgroundService.cs` or `main.c` depending on the language you chose. This folder also contains a file named `module.json` that describes the metadata of your module. Various Docker files provide the information needed to build your module as a Windows or Linux container.
237237
238238
The project folder contains a list of all the modules included in that project. Right now it should show only one module, but you can add more.
239239
@@ -269,7 +269,7 @@ Use the Azure IoT Edge tools extensions for Visual Studio Code to IoT Edge modul
269269
270270
## Develop your module
271271
272-
When you add a new module, it comes with default code that is ready to be built and deployed to a device so that you can start testing without touching any code. The module code is located within the module folder in a file named `Program.cs` (for C#) or `main.c` (for C).
272+
When you add a new module, it comes with default code that is ready to be built and deployed to a device so that you can start testing without touching any code. The module code is located within the module folder in a file named `ModuleBackgroundService.cs` (for C#) or `main.c` (for C).
273273
274274
The default solution is built so that the simulated data from the **SimulatedTemperatureSensor** module is routed to your module, which takes the input and then sends it to IoT Hub.
275275
@@ -402,7 +402,7 @@ Typically, you'll want to test and debug each module before running it within an
402402

403403
1. Set a breakpoint to inspect the module.
404404

405-
* If developing in C#, set a breakpoint in the `PipeMessage()` function in **Program.cs**.
405+
* If developing in C#, set a breakpoint in the `PipeMessage()` function in **ModuleBackgroundService.cs**.
406406
* If using C, set a breakpoint in the `InputQueue1Callback()` function in **main.c**.
407407

408408
1. The output of the **SimulatedTemperatureSensor** should be redirected to **input1** of the custom Linux C# module. The breakpoint should be triggered. You can watch variables in the Visual Studio **Locals** window.

0 commit comments

Comments
 (0)