VS 2010 RTM, SL4 RTM, .NET 4.0 RTM, WCF RIA/SL4 Toolkit RC2 Migration Story.

|  Posted: April 16, 2010  |  Categories: General Technical
Tags: .NET wcf

I been working for a while on an internal application involving the following technologies.

  • Silverlight 3,
  • .NET 3.5
  • VS 2008,
  • Prism,
  • WCF RIA Service Beta,
  • Silverlight Toolkit (Nov 2009 Release)

Project Statistics:

Here is the content of our VS solution file, quite reasonable sized application.

  • .NET Library Projects : 8
  • WCF RIA Services Project : 4
  • Prism Modules (Silverlight  Application Projects) : 8
  • Silverlight Business Application : 2 (Client and the Server)

First I converted the solution to VS 2010 by just opening the solution file from VS 2010 and navigating through the conversion wizard. No errors encountered during the migration. But obviously the solution didn’t compile for few reasons. Majority of the errors were mainly due to 2 references

  • System.ComponentModel.DataAnnotation, and
  • System.Web.DomainService

I changed the target framework setting in all the .NET Library projects to “.NET Framework 4.0”, and fixed the System.ComponentModel.DataAnnotation reference.

RIA Services Changes:

Server Side: Removed the following references from the server side (RIA services) project

  • System.Web.DomainServices
  • System.Web.Ria

and added the following new references

  • System.ServiceModel.DomainServices.Server.dll
  • System.ServiceModel.DomainServices.Hosting.dll

which can be found under c:Program FilesMicrosoft SDKsRIA Servicesv1.0LibrariesServer.

Client Side: Removed the following references from the client side (Silverlight Application) project

  • System.Windows.Ria

and added the following new references

  • System.ServiceModel.DomainServices.Client.dll
  • System.ServiceModel.DomainServices.Client.Web.dll

In addition to the above RIA dll’s you also need to add reference to System.ServiceModel.Web.Extensions.dll (found under c:Program FilesMicrosoft SDKsSilverlightv4.0LibrariesClient).

On both the server and client projects you need to correct the “using” statements in all the source files.

RIA Services Link Not Visible:

By default after the conversion your WCF RIA Client projects will still remain on “Silverlight 3” target settings. WCF RIA services is not supported on Silverlight 3 and hence you won’t see any option to configure the  “WCF RIA Services Link” in the properties windows.  Change the “Target Silverlight Version” to Silverlight 4 and you’ll see the option to select the RIA services link.

Option to copy xap files (PRISM Modules) to ClientBin folder was broken

The xap files were not automatically copied to the ClientBin folder (as part of build process) after the migration. I had to reconfigure it by going to Properties (In the Web – Server side project) and selecting Silverlight Applications tab.

Silverlight Toolkit Changes:

Remove the existing references for older version of Toolkit and add the following from the .NET list

  • System.Windows.Controls.Toolkit

Silverlight Business Application Template Changes:

This was the biggest challenge for me and took considerable amount of time. At the end, I couldn’t fix the existing solution, so recreated a standalone project using the new template and added the files from the previous solution.

Busy Indicator:

The Silverlight Business Application template uses its own version of BusyIndicator (source included) instead of the one from ToolKit, which resulted in some conflicts. I deleted the files under Control (BusyIndicator.*), removed the references and configured to use the one from Toolkit. Beware you need to comment the lines in Style.xaml.

Note:

After the upgrade there is no choice for you to go back to VS 2008. If you are using WCF RIA RC2 then the only choice is VS 2010, SL 4.

Author: Saravana Kumar

Saravana Kumar is the Founder and CTO of BizTalk360, an enterprise software that acts as an all-in-one solution for better administration, operation, support and monitoring of Microsoft BizTalk Server environments.

One Platform Operations, Monitoring and Analytics Software
BizTalk360

microsoft biztalk

Learn more

Over 500 customers across 30+ countries depend on BizTalk360

ServiceBus360

Azure service bus

Learn more

Start managing your Azure Service Bus namespaces in minutes

One Platform - Operations, Monitoring and Analytics Software
BizTalk360

microsoft biztalk

Learn more

Over 500 customers across 30+ countries depend on BizTalk360

One Platform - Operations, Monitoring and Analytics Software
ServiceBus360

Azure service bus

Learn more

Start managing your Azure Service Bus namespaces in minutes

Back to Top