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