1.1 When I start a new Project and add a ADO.NET Entity Data Model it automatically adds the following assemblies:
System.Data.Entity
System.Runtime.Serialization
System.Security
So I would remove them from the Project and add them again just to make sure using the highest version.
1.2 There can be only one version of Ria on your machine. So your project automatically uses the last installed version.
1.3 Go to the Properties page of your Silverlight Project and open the Tab 'Silverlight'. Change the version to Silverlight 5 under Target Silverlight Version: Important note: If you have a large project this will take very VERY long to complete. Make yourself some coffee and wait. The UI can become unresponsive when changing it, however don't touch it. Even when you loose your patience. If you do abort than there will probably remain some faults in your .csproject file.
First point 3: Install the Silverlight 5 Tools also on your server along with the Entity FrameWork 4.1 this way it won't matter if your forgetting to set Copy Local
to True
for a new Silverlight assembly. ( Which means you won't have to republish again if you forgot. )
Point 2: Make sure your project works with the new installed versions by checking/doing the following things:
- Remove the bin and obj folders in both projects.
- Remove the hidden GenerateCode
folder in your Silverlight Project.
- Make sure your own referenced assemblies are also targeting Silverlight 5.
- After ReBuilding when doing all of this I would do something that looks odd but has proven to solve stupid errors: In the properties page of your Silverlight project disable the WCF Ria Services link
by setting it to <No Project Set>
Build your project (resulting in a lot of errors, I know) Switch the link back and rebuild. Remember that Ria supports Complex-Object Serialization since SP1 which they wanted to be there from the first version but couldn't finish it in time. This can give you a headache if you included assemblies to the silverlight client that includes object types also existent on the server side.
Good luck and if you get any troubles than just ask.