简体   繁体   中英

How to upgrade from WCF RIA Service 1.0 to SP2 - Silverlight and Entity Framework

Can anyone provide a step by step guide for upgrading a VS2010 solution from RIA Services 1.0 + Silverlight 4 to RIA Services 1.0 SP2 + Silverlight 5?

My solution is set up in the normal fashion:

  1. MyApp.Web - ASP.NET Server project (entity framework here)
  2. MyApp - Silverlight client project (RIA Services "connects" this with MyApp.Web)

Here is what I have so far:

  1. Uninstall WCF RIA Services Toolkit and WCF RIA Services V1.0 for VS2010
  2. Install VS2010 SP1
  3. Install Entity Framework 4.1
  4. Install Silverlight 5 Tools (contains RIA Services 1.0 SP2)

Here is where I am lost. What do I do next? In particular:

  1. What project references do I need to remove/add from my client and server projects?
    1. to go from Entity Framework 4.0 to 4.1
    2. to go from RIA Services 1.0 to RIA Services 1.0 SP2
    3. to go from Silverlight 4 to 5
  2. Anything else I am missing?
  3. What do I need to do on my production server (running Win XP) where my solution is deployed to?
    1. I remember installing .NET Framework 4.0 and RIA Services distributable (awhile back)

Thanks in advanced.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM