HowTo : Upgrade Winforms Projects from 2.0 to 4.0 Framework

Many customers face problems while upgrading their project from 2.0 framework to 4.0 framework. Few of them also ask if they need to replace the existing 2.0 controls with some other controls or they just need to change the reference path. In this blog, you will find answers to similar questions from different customers. Before we continue further with the steps to upgrade the project, it is important to know that all the C1 Controls for Winforms are available for both 2.0 and 4.0 framework. And the assemblies for both the frameworks are installed separately while installing the Winforms suite from ComponentOne. On running the Studio for Winforms setup, the C1**Controls for Winforms are installed at the following directory path : For 32-bit : C:\Program Files\ComponentOne\Studio for WinForms\bin For 64-bit : C:\Program Files(x86)\ComponentOne\Studio for WinForms\bin At this path you will observe the following sub folders, namely : v2 : this folder has 2.0 builds of all the controls v4 : this folder has 4.0 builds of all the controls Next, you can perform the following steps to upgrade your Winforms Application from 2.0 to 4.0** :

  • Change the target framework of your application to 4.0 or 4.0 Client Profile as per your requirement.
  • Close the design mode of the form and then expand the References Node in the Solution Explorer in your project.
  • Remove references of all the existing 2.0 dll(s) from ComponentOne.
  • Right-click on the References Node and select the 'Add References' option.
  • Browse to the following location: C:\Program Files\ComponentOne\Studio for WinForms\bin\v4 and add the required dll(s).
  • Rebuild the whole project. Make sure that the licenses.licx file has been updated accordingly.

In case you get License Nag screen after upgrading the project, you may refer to the License troubleshooting FAQs from the Documentation. And that's it. Your project has been upgraded from 2.0 to 4.0 framework. :)


GrapeCity Developer Tools
comments powered by Disqus