Mori.RosSharp.MsgGen 1.2.0

dotnet tool install --global Mori.RosSharp.MsgGen --version 1.2.0
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local Mori.RosSharp.MsgGen --version 1.2.0
                    
This package contains a .NET tool you can call from the shell/command line.
#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 .msg files, or directories laid out ROS-style (<package>/msg/<Name>.msg or <package>/<Name>.msg) — the package name comes from the directory. Works directly against a ROS installation's share tree, including over the WSL share:

    rosmsggen -o Generated \\wsl$\Ubuntu-20.04\opt\ros\noetic\share\sensor_msgs\msg
    
  • Nested 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
1.2.0 134 7/18/2026
1.1.0 128 7/13/2026