ComponentOne WebMenus and WebBars for ASP.NET: ComponentOneWebMenus and WebBars for ASP.NET Overview > Migrating a C1WebCommand Project to Visual Studio 2005

Migrating a C1WebCommand Project to Visual Studio 2005

To migrate a C1WebCommand Visual Studio 2002 or 2003 project using C1WebCommand components to Visual Studio 2005, there are four main steps that must be performed. First, you must convert your project to Visual Studio 2005, which includes removing any references to a previous assembly and adding a reference to the new assembly. Secondly, the .licx file, or licensing file, must be updated in order for the project to run correctly. Thirdly, modify the Web.Config file so that the HttpHandler references are changed from C1.Web.C1Command to C1.Web.C1Command.Classic.2. Finally, the assembly reference in each Web form must be updated to reference the new assembly.

If you are creating a new C1WebCommand2 project in Visual Studio 2005, please use the C1.Web.Command.2.dll assembly and C1.Web.Command namespace.

To convert the project:

1.   Open Visual Studio 2005 and in the File menu, select Open and choose Web Site from the submenu.

2.   Locate the folder for the ASP.NET project that you wish to convert to Visual Studio 2005. Select it and click Open. The Visual Studio Conversion Wizard appears.

3.   Click Next.

4.   Select Yes, create a backup before converting to create a backup of your current project and click Next.

5.   Click Finish to convert your project to Visual Studio 2005. The Conversion Complete window appears.

6.   Click Show the conversion log when the wizard is closed if you want to view the conversion log.

7.   Click Close. The project opens. Now you must remove references to any of the previous ComponentOne .dlls and add references to the new ones.

8.   Go to the Solution Explorer (View | Solution Explorer) and select the project node. Click the Properties button.

9.   The Property Pages dialog box opens. Select the C1.Web.C1Command reference and click Remove.

10.  Click Add Reference. Locate and select the c1.Web.c1command.classic.2.dll. Click OK to add it to the project.

11.  Click OK to close the Property Pages dialog box.

To update the .licx file:

1.   In the Solution Explorer, right-click the licenses.licx file and select Delete.  

2.   Click OK to permanently delete licenses.licx.

3.   If the Web form is not open, double-click the .aspx file to open it. Switch to Design view to create a new licenses.licx file.

4.   Right click the licenses.licx file in the project explorer, and select Build Runtime Licenses. If it fails, try it again.

Modify the Web.Config file

If you have implemented any event handlers, you must change each to correspond to the C1.Web.C1Command.Classic.2 assembly.

Note that, if you store the assembly in the Global Cache Assembly(GAC), you'll also need to do the following:

1.   Open the Web.Config and locate the <assemblies> tag.

2.   Replace the old assembly name, C1.Web.C1Command, in the last <add assembly> tag with the new assembly name, C1.Web.C1Command.Classic.2.

To update each Web form:

1.   Open an .aspx file. Switch to Source view and locate the line at the top of the document that reads:

<%@ Register TagPrefix="cc1" Namespace="C1.Web.C1Command" Assembly="C1.Web.C1Command" %>

2.   Change it to read:

<%@ Register TagPrefix="cc1" Namespace="C1.Web.C1Command" Assembly="C1.Web.C1Command.Classic.2" %>

3.   Repeat for each .aspx file.

4.   Right-click the main .aspx page and select Set As Start Page.

5.   Click the Start Debugging button to compile and run the project.

 

The migration process is complete.

 


Send comments about this topic to ComponentOne.
Copyright © 1987-2009 ComponentOne LLC. All rights reserved.