WEBfactory 2010

Upgrading a Silverlight project to Silverlight 5 using Blend for Visual Studio

Abstract

Learn how to updgrade a WEBfactory 2010 project to Silverlight 5 using Blend application for Visual Studio.

As WEBfactory 2010 version 3.6 comes with Silverlight 5, any existing projects based on the Silverlight framework must be upgraded to the latest version of the framework, Silverlight 5. This article will guide you through the steps required to upgrade your projects using Blend for Visual Studio.

Existing SmartEditor projects are update automatically to Silverlight 5.

After upgrading your WEBfactory 2010 installation to version 3.6, all the dll files from the Silverlight/Standard folder will be updated to version 3.6.x. This article covers three possible scenarios:

If, for any project, the referenced DLL files have a different location than the default one (the Silverlight/Standard folder from the installation directory), you need to replace the old DLL files with the latest version provided by the WEBfactory 2010 3.6 Setup.

All the projects inside a solution must be updated to Silverlight 5.

IMPORTANT: Silverlight 5 Toolkit must be installed!

Upgrading a project to Silverlight 5
  1. Backup your project and the database.

  2. Navigate to the project folder on the disk and delete the Bin and Obj folders. This will make sure that no errors will occur when updating the references.

  3. Open the project in Blend for Visual Studio.

    If Blend displays security and/or incompatibility errors when opening the project, ignore them and proceed with the next steps.

    Capture4219.jpg
    Capture4220.jpg
  4. In order to update the application and site projects to Silverlight 5 and .NET Framework 4.5, we need use Visual Studio. Right-click on the solution inside the Projects panel of Blend and select Edit in Visual Studio.

    Capture4182.jpg
  5. In Visual Studio's Solution Explorer, right-click on the Site project and select Property Pages.

    Capture2828.jpg
  6. In the Property Pages window, select the Build section from the left side panel. Set the Target Framework to .NET Framework 4.5.

    Capture2829.jpg
  7. Next, click on the Silverlight Applications section and make sure that the SilverlightApplication is added to consume the project. If not, add it using the Add... button. This step will make sure that the project will be displayed at run time if the original Silverlight 4 project was never built.

    Capture28293.jpg
  8. Click OK to confirm the change and also confirm the Target Framework Change dialog.

    Capture2830.jpg

    The Site project will be automatically closed and Visual Studio will notify you than the Site project cannot be displayed. Disregard the notification and proceed with the next steps.

  9. Save the changes using the File > Save All menu option and close Visual Studio.

  10. Blend will automatically detect the changes and will ask you to confirm the reloading of the project. Click Yes.

    Capture4183.jpg
  11. In the Projects panel, expand the References folder from the application project.

    Capture4184.jpg
  12. Select the references to the old WEBfactory DLL files (use the Ctrl key for multiple selection), right-click on the selection and click Remove from Project.

    Capture4185.jpg

    IMPORTANT: Make sure not to remove the default project references to:

    • mscorlib

    • System

    • System.Core

    • System.Net

    • System.Windows

    • System.Windows.Browser

    • System.Xml

  13. Blend will ask you to confirm the removal of references. Click Yes to confirm. Only the default references will be left in the project.

  14. Next, the references to the new DLL files must be added. Right-click on the References folder and select Add Reference....

    Capture4186.jpg
  15. Using the Add Reference dialog, navigate to the folder containing the WEBfactory 2010 version 3.6 Silverlight DLL files. By default, the DLL files will be located in the WEBfactory installation folder. If the DLL files are copied to another location for referencing, navigate to that location.

    Capture4187.jpg
  16. Select the required DLL files to be referenced and click Open. The references will be added to the project.

  17. In the Projects panel, right-click on the solution and select Clean Project.

    Capture4188.jpg
  18. Close Blend for Visual Studio and reopen it. Open the upgraded project. This will make sure that Blend loads in memory the new references.

  19. Build the project. The project should build without any errors.

Upgrading a project using a re-skinned WFTrending3 control to Silverlight 5

This section describes the additional steps required to upgrade a project with a re-skinned WFTrending3 control to Silverlight 5. All the steps from the previous section, Upgrading a project to Silverlight 5, must be applied before.

When upgrading a project containing a re-skinned WFTrending3 control, the ComponentOne namespace of the new style (xmlns:c1) must be update to http://schemas.componentone.com/winfx/2006/xaml.

  1. Open the page containing the styled WFTrending3 control in Code view.

  2. Find the obsolete ComponentOne namespace: clr-namespace:C1.Silverlight.Chart;assembly=C1.Silverlight.Chart.

    Capture4189.jpg
  3. Replace it with the new one: http://schemas.componentone.com/winfx/2006/xaml.

    Capture4190.jpg

    Alternatively, you can use the Replace functionality of Blend for Visual Studio 2012 (Ctrl + H) to quickly find the old namespace and replace it with the new one.

  4. Clean the project and rebuild it. The project is now updated to Silverlight 5.

Upgrading a project with Service References to WEBfactory services to Silverlight 5

This section describes the additional steps required to upgrade a project having Service References to WEBfactory services to Silverlight 5. All the steps from the previous section, Upgrading a project to Silverlight 5, must be applied before.

  1. From the Projects panel of Blend, right-click on the solution and select Edit in Visual Studio.

  2. In Visual Studio, in the Solution Explorer, expand the Service References folder inside the Silverlight project.

  3. Select all the service references and right-click. Select Update Service Reference.

    Capture2840.jpg
  4. Wait until the update is finished. Save the solution and close Visual Studio. Blend will ask you to update the modified project. Click Yes.

  5. Clean the project and rebuild it. The project is now updated to Silverlight 5.

Upgrading a project with WEBfactory User Manager to Silverlight 5

This section describes the additional steps required to upgrade a project containing the WEBfactory User Manager to WEBfactory services to Silverlight 5. All the steps from the previous section, Upgrading a project to Silverlight 5, must be applied before.

The User Manager specific references must be manually replaced with the newer versions (remove and add them again using the new DLL files):

  • System.ServiceModel.DomainServices.EntityFramework.dll

  • System.ServiceModel.DomainServices.Hosting.dll

  • System.ServiceModel.DomainServices.Server.dll

  • WFUserManagementRIAServices.Web.dll

The required DLL files are located in the Studio/UserManager/bin folder, inside the WEBfactory 2010 installation directory.

  1. In the Projects panel of Blend for Visual Studio, expand the bin folder of the Site project.

    Capture4191.jpg
  2. Select and remove the following references:

    • System.ServiceModel.DomainServices.EntityFramework.dll

    • System.ServiceModel.DomainServices.Hosting.dll

    • System.ServiceModel.DomainServices.Server.dll

    • WFUserManagementRIAServices.Web.dll

    Capture4192.jpg
  3. Right-click on the bin folder and select Add Existing Item....

    Capture4193.jpg
  4. In the Add Existing Item dialog, navigate to the WEBfactory 2010 installation folder, then Studio/UserManager/bin. Select the newer version of the DLL files and click Open to add them to the project.

    Capture4194.jpg