Skip to main content

Publish and Install

Up until now, we've only tested our plugin locally and verified that all metrics are registered and updated as expected.
In this section, we'll publish the plugin and install it to MoBro to see it in action.

The .csproj file we created during Setup already contains everything required for publishing, so no further changes are necessary.


Using the MoBro Plugin CLI

Publishing the Plugin

The easiest way to publish the plugin is the MoBro Plugin CLI. Run the publish command in the project directory:

mobro publish .

This builds the plugin and packs it into a .zip file named [name]_[version].zip, using the name from mobro_plugin_config.json and the version from the .csproj file:

Plugin.Example
├── example_plugin_0.0.1.zip
├── mobro_plugin_config.json
├── Plugin.cs
├── Plugin.Example.csproj
└── Program.cs

The published plugin only contains the plugin's own .dll and its configuration file, so it's just a few KB in size.

Installing the Plugin

With MoBro running on the same machine, install the plugin using the install command:

mobro install .\example_plugin_0.0.1.zip
tip

To skip the separate publish step, install the plugin straight from the project directory. The CLI then builds and publishes the plugin automatically:

mobro install .

If an older version of the plugin is installed, it is updated. If the same or a newer version is already installed, the CLI asks whether to replace it. Replacing uninstalls the plugin first, so its settings are reset and all of its stored data is deleted.


Without the CLI

info

This section explains how to publish and install the plugin without the CLI. Skip it if you've already used the CLI.

Publishing the Plugin

Run the following command in the project directory:

dotnet publish --framework net10.0 --runtime win-x64 --self-contained false --configuration Release -p:DebugType=None -p:DebugSymbols=false -p:GenerateRuntimeConfigurationFiles=false --output publish .

This creates a new folder named publish:

Plugin.Example
├── publish
│ ├── mobro_plugin_config.json
│ ├── Plugin.Example.deps.json
│ └── Plugin.Example.dll
├── mobro_plugin_config.json
├── Plugin.cs
├── Plugin.Example.csproj
└── Program.cs

Make sure the .dll file's name matches the assembly defined in mobro_plugin_config.json.

Next, add a file named build_info.json to the publish folder. It contains the build date and the version of the MoBro Plugin SDK referenced in the .csproj file:

Plugin.Example/publish/build_info.json
{
"Date": "2026-09-14T12:00:00Z",
"SdkVersion": "1.2.0"
}
info

The CLI creates this file automatically when publishing. MoBro itself doesn't need it, but without it the .zip file is rejected by the CLI (e.g. mobro install example_plugin_0.0.1.zip) and can't be published to the marketplace.

Now, pack the content of the publish folder into a .zip file, e.g. using 7-Zip:

& "C:\Program Files\7-Zip\7z.exe" a -tzip "example_plugin_0.0.1.zip" ".\publish\*"
caution

The mobro_plugin_config.json must be located in the root of the .zip file, not in a subfolder.

Installing the Plugin

Install the plugin using MoBro's local REST API by sending the name of the plugin and the .zip file:

curl.exe -X POST http://localhost:42069/api/plugins -F "name=example_plugin" -F "zip=@example_plugin_0.0.1.zip"

Verify in MoBro

Open MoBro, and you should see a new plugin named "Example Plugin":
Metric explorer

Verify that our metrics are being shown correctly and are updating.

Navigate to its settings, where the Update Frequency setting we defined earlier is available:
Settings

Metric Types and Units

Since we used metric types provided by the SDK (CoreMetricType.Usage and CoreMetricType.Data), the metrics are displayed with the appropriate units.
For instance, the memory value (provided in bytes) is automatically converted to a larger unit like GB.
No additional configuration needed — just provide the value!

Learn more under Reference: MetricType.


Development Loop

Plugins don't support hot reload. A typical workflow looks like this:

  1. Develop and debug the plugin's logic locally using dotnet run or the IDE's debugger.
  2. Whenever you want to check the current state in MoBro, run mobro install . again to update the installed plugin.

See In-depth: Testing for more options, including attaching a debugger to an installed plugin.