Mori.RosSharp.MsgGen
1.2.0
dotnet tool install --global Mori.RosSharp.MsgGen --version 1.2.0
dotnet new tool-manifest
dotnet tool install --local Mori.RosSharp.MsgGen --version 1.2.0
#tool dotnet:?package=Mori.RosSharp.MsgGen&version=1.2.0
nuke :add-package Mori.RosSharp.MsgGen --version 1.2.0
rosmsggen
Generates typed C# serializer classes from ROS 1 .msg files, for use with the
Mori.RosSharp runtime.
dotnet tool install -g Mori.RosSharp.MsgGen
rosmsggen -o Generated -n MyApp.Ros path\to\my_msgs
Each message becomes a class with typed fields, a computed RosMd5 constant (the checksum ROS
derives from the definition text, which gates every TCPROS handshake), and
Serialize/Deserialize/ToBytes/FromBytes.
Inputs
Single
.msgfiles, or directories laid out ROS-style (<package>/msg/<Name>.msgor<package>/<Name>.msg) — the package name comes from the directory. Works directly against a ROS installation'ssharetree, including over the WSL share:rosmsggen -o Generated \\wsl$\Ubuntu-20.04\opt\ros\noetic\share\sensor_msgs\msgNested types resolve against the inputs first, then an embedded set of the common messages (std_msgs, geometry_msgs, JointState, Imu, Odometry, Clock, TFMessage). The output is closed over dependencies, so it always compiles.
Options
| Flag | Meaning |
|---|---|
-o <dir> |
output directory for the generated .cs files (required) |
-n <namespace> |
root namespace; classes land in <namespace>.<package> (default RosMessages) |
--package <name> |
package name for loose .msg files whose directory doesn't imply one |
Prefer generation at build time with no committed files? The Mori.RosSharp package bundles a
Roslyn source generator that does the same from .msg files added as AdditionalFiles.
License
Apache License 2.0 © 2026 Cristian Mori.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.