C# library for reading AND writing TMX files

Hello all. I have a program that I’d like to add TMX (and probably TSX now that I think about it) export support to, but all the C# libraries that I’ve seen seem to only deal with TMX import. That is, reading TMX files rather than creating TMX files.

Is there a C# library that I can use to create TMX files? I’d rather not reinvent the wheel if one already exists.

I’m not aware of any, except that the tIDE map editor can read and write TMX files, so it must have some C# code for it, but it will be lacking support for many features (and its internal data structures are somewhat different).

If I were you I’d probably determine the most up-to-date of the known C# libs (I think it is TiledSharp) and add writing support to it, probably after also getting in touch with the author to check if it’s a feature they’d (co-)maintain.

Yes, I had the same idea, and I’ve opened an issue on the tracker already posing that very question. It could be some time before I get a response though!

Thanks for the reply.