Note that there are some explanatory texts on larger screens.

plurals
  1. POGenerating Silverlight service reference - how to tell what is causing proxy classes to be generated
    primarykey
    data
    text
    <p>I have a large object structure that I'm wanting to share between a .Net4 backend and a Silverlight 5 front end. I've created two class library projects of the appropriate type, and have my object structure implemented in the .Net library, and linked into the SL library. On the Silverlight client side I am referencing the Silverlight class library. When I generate the service reference I have checked the option to "Reuse types in referenced assemblies". However when I generate the service reference I am finding that types that are in referenced assemblies are still being generated. It is only certain types, and appears to be largely collection types (attributed with <code>&lt;CollectionDataContract&gt;</code>). </p> <p>I have a main object that has many properties which are generally either <code>List&lt;MyTypeA&gt;</code> or in some cases they are <code>MyListTypeB</code>, where <code>MyListTypeB</code> inherits from <code>List&lt;MyTypeB&gt;</code>. It seems to be the classes similar to <code>MyListTypeB</code> that are causing the proxies to be generated. These are all attributed with <code>&lt;CollectionDataContract&gt;</code> and have a default constructor.</p> <p>I also find that even though the project where I am adding the service reference to has a reference to the other SL <em>project</em> containing the entities, when I update the service a new reference directly to the dll is also being added to the project. I'm not sure why this is happening, or if it is causing confusion in the service proxy generation</p> <p>Is there any way to tell what classes/properties are causing the service generation to generate proxy classes? Or is it a case of trial and error having to comment out attributes until they aren't generated and hone in on the problem class?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload