RIA Services + Silverlight 5


  • Hi on SL5 and RIA Services I always get this error: the attribute 

     // The following attributes were not generated:
            // - The attribute 'System.ComponentModel.DataAnnotations.RoundtripOriginalAttribute' is not visible in the client project 'XXXXX'. Are you missing an assembly reference?
            // [RoundtripOriginalAttribute()]

    I've had to change my update methods since the RoundTripOriginal never gets generated. Adding the DLL and manually adding the attribute on client doesn't seem to take effect when going to the server to update values.


    Tuesday, July 19, 2011 3:36 AM

All replies

  • Hi,

    First suggestion:

    Open the Solution Explorer in your Visual Studio, expand the References node of your Sivlerlight project, make sure the System.ServiceModel.DocumainServices.Client has been in the list. If not please add it, you can get it in this location:

    c:\Program Files (x86)\Microsoft SDKs\RIA Services\v1.0\Libraries\Silverlight\System.ServiceModel.DomainServices.Client.dll

    Second suggestion:

    Open the Solution Explorer in your Visual Studio, right-click the root node of your Silverlight project, select "Properies..." , in the Silverlight Tab, make sure the "Target Sivlerlight Version" is Silverlight 5 and at the bottom, the "WCF RIA Service link" is the name of your web project name. If not, please choose it from the list.

    Wednesday, July 20, 2011 9:22 PM
  • Hi,

            No this is not working...the 2 suggestions..I already have the correct libraries on client on server pointing to SL5...



    Tuesday, August 09, 2011 10:35 AM
  • To test silverlight applications - try eggPlant form TestPlant. Video of eggPlant for Silverlight validation -

    Friday, August 12, 2011 11:22 AM
  • Have excactly same problem, can't get it fixed in two days.

    It works in fresh new project, but not the one upgrated from SL4.

    I hate Silverlight5!!!!!!!!!!!!!!!!!!!!!


    Found the solution myself!!!

    I don't understand why, but it works.

    1. Go to you web project, expand "References" folder.

    2. Right Click "System" reference node, select "Properties"

    3. Change "Copy Local" from "True" to "False"

    4. Build you web project again, than magical happens.

    I think I accidently set "copy local" to true long time ago. This has waste my boss two days salary.

    I need to find a good excuse for this.

    Wednesday, December 14, 2011 10:02 PM
  • To andy2001p:

    Your solution is working! Weird one...but it works! You need a raise and not an excuse for this Wink


    Tuesday, December 27, 2011 3:00 PM
  • thanks for this solution, it works for me after a while,,,, i will explain.

    first time it did not work, i started getting a differrent error..."

    The following exception occurred creating the MEF composition container:

    Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401)

    The default code generator will be used.              

    track that one with no help. then some old experience got into my mind....delete Bin folder

    and re-try ...this time it worked.

     do you think this Bin folder could possible have and old DLL.

    thanks any way! (saved a day on this issue thanks to your post, i did expend a day when it did not work the first time),


    Friday, January 06, 2012 12:52 PM
  • Your solution worked for me also. I'm pretty sure I did'nt manually changed this property but the fact is... it solved my problem.

    I did spend several hours on this one.

    A big thank you to Andy2001p.

    Thursday, April 19, 2012 10:25 AM
  • Hi,

    I am adding the message here so that if anyone else comes across this, it may help them resolve their issue and not waste three days.

    Following the suggestions here and on a few other links I still could not resolve the issue within a Project that was upgraded from SL4 to SL5 a while back.
    It works on about 6 other developers machine sharing the code.

    On a SL5 test project, created from scratch, it works fine.

    On a SL4 test project, created from scratch and upgraded it also works fine.

    I tried removing the Composition assembly, and re-add it.
    I removed and re-added .net framework, silverlight, ria services, the toolkits, the tools, and visual studio in the end, including all service packs.

    Turns out, downloading a complete fresh copy of the source code again to a new location seems to have resolved the issue.
    Even deleting all the unchecked out copies of everything (Bin, obj, suo, user etc), and building again using just an msbuild cmd line) didn't do it. It only worked when it was a fresh check out.
    Hope this helps anyone else.

    Tuesday, October 02, 2012 9:00 AM