I tried using BinaryFormatter and a class with one public field (a string) and yet, an identical class in another application couldn’t deserialize it.
If possible, I’d like the class to contain a field of its own type (recursive) but if not – strings, ints, and byte arrays are the most important.
If you can’t share a class library between applications, you can create a mirroring class in the client (consumer) application and map all its properties to the properties of the “initial” class + some auxillary info. This will be your proxy class. Then, you should take control over the deserialization process. For instance, use xml to hold data. You can encrypt the contents of the file and share the public key between applications if security is critical.