dsuarezv / mavlink.net

A better MavLink object generation for C#. Richer message classes are generated from the object definitions.
39 stars 35 forks source link

internal virtual SerializeBody() and DeserializeBody() error #6

Closed xhbbfan closed 10 years ago

xhbbfan commented 10 years ago

I used mavlinkgen to generate my message file from XML and include it into my project, but I got errors similar to this - 'UasEvent.SerializeBody(System.IO.BinaryWriter)': no suitable method found to override. SerializeBody() was defined as internal virtual void in mavlink, I added reference to mavlink.dll, not sure why got this kind of error. Thanks.

Henry

dsuarezv commented 10 years ago

It's not really enough to include the generated .cs file with the messages in your project, since the classes it generates inherit and use some others defined in the mavlink.net assembly. The best way is to generate the messages overwriting the existing "GeneratedMessages.cs" file in the mavlink.net project, build and reference that in your project.