I have successfully used protobuf-net.dll in console and WPF applications. However, when I tried using it in a Silverlight 5 application, I get the error message:
“you can’t add a reference to protobuf-net.dll as it was not built against the Silverlight runtime. Silverlight projects will only work with Silverlight assemblies.”
At the protobuf-net site (http://code.google.com/p/protobuf-net/), I see references to Silverlight compatibility issues, but could not find a Silverlight dll. How can I use protobuf-net in a Silverlight 5 application?
Thanks
Manish
The Nuget package contain a Silverlight-specific build; if you add the reference via the Nuget package manager, it should set itself up correctly automatically.
If you are downloading the package from google-code, simply expand the .zip (r480, currently); it contains a “sl4” directory which contains the library built for Silverlight 4 (and above).