locked
Generated proxy has Serializable attribute on ComplexTypes RRS feed

  • Question

  • I first posted this question to the Silverlight forums and have had no luck getting a response, but perhaps this was the correct area to post it anyways. Here is my original post for reference: http://silverlight.net/forums/t/17655.aspx

    I have created a small sample project that shows the problem:
    http://test.accuauto.net/SilverlightDataServicesTest.zip

    My model has several ComplexTypes, and the DataSvcUtil tool decorates the objects that represents them with the Serializable attribute that Silverlight does not support and therefor the project does not compile when the generated proxy is added. Is this supposed to work at this point or am I wasting my time? It compiles if I manually remove the serializable attributes, but I have not had the time to test it to see if it will work reliably in that setup or not.

    I developed the model and tested it with a WPF & data services based desktop client initially while I was waiting on the latest release to get the Silverlight support. It seemed to work fine in that scenario.
    Tuesday, July 8, 2008 1:21 PM

Answers

  • Hi,

     

    I just tried this on the current (post .NET 3.5 SP1 Beta 1) bits and the [Serializable] attribute is not there as expected, so this is fixed now (unfortunately that means you'll need to wait until the final version of the framework -with the final version of datasvcutil and other code-gen paths- to get it). In the meanwhile, you can manually correct the generated file, knowing that this will get fixed once the tools ship. Hope this helps.

     

    Pablo Castro
    Software Architect
    Microsoft Corporation
    http://blogs.msdn.com/pablo

     

    Wednesday, July 9, 2008 4:53 AM
    Moderator

All replies

  • Hi,

     

    I just tried this on the current (post .NET 3.5 SP1 Beta 1) bits and the [Serializable] attribute is not there as expected, so this is fixed now (unfortunately that means you'll need to wait until the final version of the framework -with the final version of datasvcutil and other code-gen paths- to get it). In the meanwhile, you can manually correct the generated file, knowing that this will get fixed once the tools ship. Hope this helps.

     

    Pablo Castro
    Software Architect
    Microsoft Corporation
    http://blogs.msdn.com/pablo

     

    Wednesday, July 9, 2008 4:53 AM
    Moderator
  • Yes, it helps a lot. I know I'm not just doing something stupid, that it was a problem that has since been fixed, and have a workaround to use until the fix is released.
    Wednesday, July 9, 2008 12:23 PM