1

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

2 Answers 2

1

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).

Sign up to request clarification or add additional context in comments.

1 Comment

oh, I now see the sl4 folder, I should have guessed.
0

In the souce distribution there is a project file

.\protobuf-net_Silverlight\protobuf-net_Silverlight.csproj

included in the distribution. I personally haven't worked with the silverlight stuff, but it might get you to where you need to be.

1 Comment

Thanks very much, I had not thought of looking at the source distribution. This pointer will be very helpful to learn more about the pbf-net implementation. For my current purposes, Marc's solution works well and unfortunately, I am not allowed to accept both answers.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.