Skip to main content
This guide creates an assembly package that writes an event when the Neuron starts.

Prerequisites

  • A local Neuron installation that you can stop and start.
  • The .NET SDK.
  • PowerShell.
  • The Neuron application folder, program-data folder, and Windows service name.
The sample below was build-tested with Waher.IoTGateway 3.10.2. Use the version that matches your installed Neuron when they differ.

1. Create the project

The package targets .NET Standard 2.1 because the public runtime package targets that framework.

2. Configure the project

Replace HelloNeuron.csproj with:

3. Add a module

Delete Class1.cs and create HelloNeuronModule.cs:
The runtime discovers concrete IModule implementations and calls Start after loading the assembly.

4. Add the manifest

Create HelloNeuron.manifest next to the project file:
The manifest lists every assembly and content file installed by the package.

5. Build

Verify that the output folder contains:
Warnings about a transitive dependency resolving to a newer patch version come from the published runtime package. Review them against the target Neuron instead of suppressing all NuGet warnings.

6. Install in the local Neuron

Set these values from your installation:
Stop the service, install from the manifest, and restart:
The executable and data paths can differ between installer versions. Read the Windows service PathName and the Neuron configuration instead of copying paths from another machine.

7. Verify

Open the Neuron event log and search for:
If the event is present, the runtime found the assembly, created the module, and called Start.

Next step