Take the 2-minute tour ×

This otherwise great open source collection won't build on the Windows 7 Phone because it uses Serializable and the ICloneable interface, which is internal within Silverlight based frameworks. Does there exist an alternative or a ported version?

share|improve this question

1 Answer 1

up vote 9 down vote accepted

I recommend downloading the source from CodePlex and building it in a WP7 application.

What we do when we share code across platforms like this where specific attributes are not supported, is to add stub classes to the Silverlight project for the unsupported attributes. This allows the source to compile on all platforms without needing change.

For example, here is our stub for Serializable:

/// <summary>
/// This is a dummy attribute to support silverlight
/// </summary>
/// <remarks></remarks>
public class Serializable : Attribute
    public Serializable() : base()

You may also find that there are unsupported method overloads (Silverlight has fewer overloads for various methods). If this is the case, you can just use conditional compilation to provide the correct overload for the missing methods.

share|improve this answer
Suggestion: Wrap it in #if WINDOWS_PHONE ... #endif. –  Claus Jørgensen Dec 27 '11 at 15:09
@Rhubarb: Just checking to see if you were interested in awarding the bounty on this question? –  competent_tech Dec 31 '11 at 3:38

Your Answer


