Installing C1 for existing program

Posted by: Hans on 20 June 2019, 10:34 am EST

  • Posted 20 June 2019, 10:34 am EST

    I have just installed the latest version of Winforms Edition and when I try to compile an existing program containing an older version, I get several error messages at build time. What is the correct way to migrate my existing programs to this new version.
  • Replied 20 June 2019, 3:18 pm EST

    Hello Hans,

    To guide you in the correct direction, we would first need information about the error messages you are observing, as they could be related to licenses, changed namespaces etc. Also, it depends on from how old version are you upgrading.
    So, I'd request you to share screenshots of the complete error messages to help us proceed.

    Also, following are general suggestions that should be taken care of while upgrading existing projects:
    1. Make sure that SpecificVersion of all the ComponentOne assemblies referred in all the projects of the application is set to False.
    2. The licenses.licx file present in the project contains correct entries for all the components used (at design and at run time both).
    For list of entries needed, please refer: https://help.grapecity.com/componentone/NetHelp/c1studiowinforms/webframe.html#Creating_components_at_run_time.html

    Best wishes,
    Ruchir
  • Replied 21 June 2019, 2:18 am EST

    The old version is 4.0.20152.74 and the new is 4.0.20191.359
    See attached the build errors
  • Replied 21 June 2019, 2:19 am EST

    Severity Code Description Project File Line Suppression State
    Error Exception occurred creating type 'C1.Win.C1Preview.C1PreviewPane, C1.Win.C1Report.4, Version=4.0.20152.74, Culture=neutral, PublicKeyToken=41780e2fc605e636' System.TypeInitializationException: The type initializer for 'C1.Win.C1Preview.C1PreviewPane' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'C1.C1Zip.4, Version=4.0.20152.74, Culture=neutral, PublicKeyToken=79882d576c6336da' or one of its dependencies. The system cannot find the file specified. PCOS C:\HGC\PCOS\Programs\Group_EndUSerPrograms\PCOS\My Project\licenses.licx 3
  • Replied 23 June 2019, 9:24 pm EST

    Hi Hans,

    Regarding the error 'Could not load file or assembly', it is most likely to occur when Visual Studio is not able to find this specific dll/assembly. But can also stem from version mismatch (if you have set SpecificVersion for this dll to true and all other dlls to false).
    We have the following article discussing about the same problem and steps to resolve it, therefore we request you to please refer the same.

    Article: https://www.grapecity.com/blogs/a-step-ahead-troubleshooting-common-errors-part-i
    Let me know, if there are any other errors coming across.

    Thanks,
    Ruchir
  • Replied 25 June 2019, 9:56 am EST

    I followed the instructions, as per solution 2 in the linked page, and it does not work. I should note that I am using VS 2019, so maybe it functions differently, but none of the suggestions have worked.

    Again the question is how do I upgrade my C1 tools to the latest version without rewriting my programs. I've attached a small program that uses tooltips. Can you tell me how you can upgrade that.

    Thanks
  • Replied 25 June 2019, 9:13 pm EST

    Hans,

    It seems the file you attached did not upload correctly. Could you please re-attach it so that we can try to fix your sample application.
    *Please be informed that the upload limit here is 5 MB, so do make sure to remove the bin folder before uploading.

    Thanks,
  • Replied 26 June 2019, 2:08 am EST

    let me try again. The file is 1.6 MB
  • Replied 26 June 2019, 3:07 am EST

    I have attached a simplified version of the test program, it is only .5 MB. Please use this instead of the one I sent earlier.

    This program was written and compiled in VS 2013 using C1 version 4.0.20152.74 and I'm trying to upgrade the C1 ToolTip Control to version 4.0.20191.359 using VS 2019.
  • Replied 26 June 2019, 4:28 pm EST

    Hello,

    Sorry, but I still do not see any file attached.
    If you cannot get the file uploaded here, please try uploading it to: https://www.dropbox.com/request/jsUo659rCWox94ITIdct

    Waiting for your application,
    Ruchir
  • Replied 27 June 2019, 2:57 am EST

    OK, done
  • Replied 27 June 2019, 6:39 pm EST

    Thank you.
    Following are my observations:
    1. SpecificVersion of the C1.Win.C1SuperToolTip.4 dll was True. You should set it to False for all ComponentOne dlls.
    2. The licenses.licx file had version information. You should strip out Version, Culture and PublicKeyToken information from each entry in licenses.licx file.
    Performing these actions your application ran fine at my end.

    However since you already tried solution#2 of the article suggested earlier, I suspect you still have old version components referenced in your toolbox.
    Can you open toolbox, hover mouse over C1SuperToolTip and see what version does it shows? Also, look out for the version of the dlls installed at default location: C:\Program Files (x86)\ComponentOne\C1StartMenu. If it shows any version other than 4.0.20191.359, you should un-install ComponentOne and install again.

    Kind regards,
    Ruchir
  • Replied 28 June 2019, 4:04 am EST

    First of all, this is a new computer and the only C1 components that I've loaded are the latest ones. Hovering in the Toolbox indicates the latest version.

    I have followed you suggestions. First I changed the Specific Version to false, and removed the version and toke information from the license file. Then I removed the old SuperTooltip from the form and tried to add a new one from the toolbox and i get the error in the attachment called Err1.

    So then I started over, but this time I removed the entire license file and when I try to remove the tooltip control I get the error in the attachment Err2.

    So I started over again, removed the license, removed the control, removed the reference and this time was able to add the new control, but I get compile time errors as in the attachment Err3.

    So, I don't know how you got it to work, as I said I'm using VS2019 maybe there is an incompatibility with it. So I tried to create an entirely new program, just a button, SuperTooltip control and 3 lines of code in the Button MouseHover and I got the same errors as in Err3. In otherwords, I have the same problem creating an newapplication as trying to convert an old one.

    This makes me think that there is an incompatibility with VS2019, or a problem VS or C1 was installed. Or is there something specific about SuperToolTip that I'm missing
    You are welcome to do a remote log in here and try it yourself, but as of now I have no solution. This does not work.


  • Replied 30 June 2019, 9:21 pm EST

    Hello Hans,

    Thank you for the detailed investigation.
    The error: 'Failed to create component 'C1SuperToolTip'' came because there was already an existing reference to C1SuperToolTip assembly.
    The error: 'The designer cannot process the code' came because of mismatch in designer assemblies.
    The error: 'Reference required to assembly 'C1.Win.4'' occurred because the project is missing reference to C1.Win assembly.

    Therefore to resolve the issues, you should follow the same steps like you followed in "So I started over again, removed the license, removed the control, removed the reference" And after this also add reference to
    C1.Win.4.dll from location "C:\Program Files (x86)\ComponentOne\WinForms Edition\bin\v4.0"

    Meanwhile, I will also discuss if we can do a remote session for your case.

    ~Ruchir
  • Replied 4 July 2019, 3:24 am EST

    Thanks for your advise, but sometimes it is not possible to follow. In the example used the steps taken worked, but on other occasions the step "remove the control" can be a problem.

    In order to remove the control, the form that contains the control has to be opened in VS and often results in Err2 (to prevent possible data loss before loading the designer ....) . Pressing Ignore and Continue will open the form without any controls, that is, not just the C1 control but all controls have been stripped.

    As far as I know this problem can not be solved via a conversion, but requires a complete rebuild of the program. In a case where the C1 control is Sizer, which may contain many standard MS controls, that can be a long an onerous job.
  • Replied 4 July 2019, 5:48 am EST

    Another problem is upgrading is upgrading C1Report to C1Flexreport. According to your documentation I can use C1FlexReportDesigner.4.exe but when I try to open my .XML file, I get the following message.

    Cannot load 'C:\HGC\PCOS\Programs\Group_EndUSerProgramsC1\CompanyReport\CompanyReport\bin\Release\C1.C1Report.4.xml' because of the following error:
    Object reference not set to an instance of an object.

    Any suggestions?
  • Replied 4 July 2019, 10:56 pm EST

    When you get the Err2, you may close the designer form, open its designer.cs file and remove the control from there yourself. Now re-open the form again. This should resolve the error and also prevent loss of other controls.

    Regarding upgrading from C1Report to C1FlexReport: You observe the error while loading "C1.C1Report.4.xml" in a C1FlexReportDesigner because it is not a valid report to be opened in the designer. C1Report too has .xml extension along with a proper report layout that lets you open the same in C1FlexReportDesigner as well.
    Take an already created C1Report (not the xml file related to the assemblies) and try opening the same in C1FlexReportDesigner (as explained in the 2nd point here: https://www.grapecity.com/blogs/3-ways-to-convert-your-c1report-to-flexreport).
    This should now open as a FlexReport for you, without any issues.

    Best wishes,
  • Replied 5 July 2019, 2:55 am EST

    I am disappointed by the quality of your replies to these issues. First of all, removing the control from the form does not solve the problem, you also have to remove, or comment out all references to the control in your code. This may not be a big deal for small programs like the sent you earlier, but most of our programs are larger and use multiple C1 controls on the same form. We use controls such as TrueGrid, Sizer, Excel etc. which, when addressed this way amount to a virtual rewrite.

    This is why we tried to use the conversion in C1FlexReportDesigner. First of all, whenever I start it, it gives me a warning "A newer version of FlexReports is available...." but when I try to load the newer version, I am told that I'm already up to date.

    Second, no matter which file I try to open, I get the same error message. I have no idea where to find the C1Report.xml file

    I have sent you one of our smaller programs that uses the C1 controls via your drop box. Please let me know if and how you were able to upgrade the controls using C1FlexReportDesigner or any other method.

    As stated earlier, you are also welcome to remote to my PC and try it there.
  • Replied 7 July 2019, 4:16 am EST

    Mr. Agawal,

    After further investigation I feel that I need to make a clarification and apology for the previous Email.

    It appears that Flexreport, and apparently previous versions of C1Report had a feature whereby the design of the reports can be done outside the program that generates it, as does the C1FlexReportDesigner.

    I'm not sure that this feature was available in our old version of C1Report, at any rate we never used it. Instead all of the reports are created through code. This the reason for the confusion of finding the .XML file. Therefor the issues raised in the previous Emails are not pertinent.

    Instead, when attempting to perform the same functions in C1Flexreport that we had previously coded in C1Report, we get a number of errors and undefined references. Such lines as:

    Dim rt As RenderText
    doc.Body.Children.Add(txt)
    Rttop.Cells(0, 0).Style.TextAlignHorz = AlignHorzEnum.Left
    Dim Rttop As New RenderTable
    Dim Ln1 As New RenderLine

    and others .

    I assume that these features are referenced differently in C1FlexReport than they were in C1Report. Could you point me to a document or example where I can find the equivalent C1Flexreport functions to the ones in C1Report.

    Thank You



  • Replied 8 July 2019, 10:10 pm EST

    Hello,

    We regret the issue you have been facing so far.
    C1FlexReportDesigner gives you a message to download the newer version as the Applications might not have been updated at your end. In C1Live, go to "Applications and Other Products[b][/b]" and update the same to the latest licensed version. This will update the C1FlexReportDesigner installed at your end. Let me know if you still observe the message on opening the designer after this update.


    Unfortunately, C1FlexReport does not have an equivalent to C1PrintDocument class of C1Report. Thus, conversion of the same to FlexReport is not possible. Thus, for using C1PrintDocument, it is suggested that you keep using C1Report and its assemblies.
    The conversion happens among reports having .xml extension, as the ones present at the default location on your machine (Documents\ComponentOne Samples\WinForms\C1Report\XML\CommonTasks). One of the reports is attached for your reference.

    Regards,
    Esha
    CommonTasks.zip
  • Replied 9 July 2019, 8:41 am EST

    OK, thank you, I will continue to use C1Report. Since it is no longer supported, are there plans to update Flexreport to include the features in C1Report?

  • Replied 9 July 2019, 8:06 pm EST

    Hello,

    There is no plan to support C1PrintDocument in C1FlexReport yet.
    You can use C1Report assemblies for using C1PrintDocument as that part of C1Report is not obsolete.

    Thanks,
    Esha
  • Replied 15 July 2019, 9:21 am EST

    I seem to be having other problems with this version of C1 controls and VS 2019. I cannot seem to add any controls to a a dockingTabPage1. When dragging a control over they seem to migrate to the DockingTab container, not the Tab page. If I try to use the documen Viewer to move it to the docking page I get the following error message " Only objects of the type C1DockingTabPage cane be added.." and the VS crashes with an error (I have reported this to Microsoft).

    I'm not sure if the C1DockingManager needs to be used but when I try to add it I get the message "Failed to create component ..."

    Any suggestions as how to place controls into a dockingtabpage.

    Thanks
  • Replied 15 July 2019, 10:14 pm EST

    Hello,

    >>Only objects of the type C1DockingTabPage cane be added
    This general error is observed when C1DockingTab is selected at the time you try to add a new control. Ensure that the C1DockingTabPage is selected first and then you try to add a control to it through the Toolbox. The error is not specific to VS 2019.

    >>"Failed to create component ..."
    Please refer the solution to this error stated under the following blog post's "'Failed to Create Component' Design Time Exception" topic:
    https://www.grapecity.com/blogs/a-step-ahead-troubleshooting-common-errors-part-i

    Let me know if you need further assistance.
    Thanks,
    Esha
  • Replied 16 July 2019, 3:00 am EST

    I realize that the problem seems to be that it appears to try to add the control to the DockingTab instead of the DockingTabPage, but no matter what I do, whenever I drag a control to the page, it seems to want to add it to the DockingTab, that is why I get the message " Only objects of the type C1DockingTabPage can be added.." It crashes VS when I then try to move the control using the Document outline.

    Further, at design time I can only access the first C1DockingTabPage1. I cannot access pages 2,3 etc.

    As I offered before, you are welcome to do a remote signon to view the problem yourself. I have attached a small test program that exhibits this behavior, but as this could be related to VS2019 I'm not sure that you can reproduce it at your site. Please address this as soon as possible we are waiting to upgrade to the latest C1 version

    Thanks

    TestDocTab.zip
  • Replied 16 July 2019, 8:10 pm EST

    Hello,

    Thank you for your application. I executed the same on VS 2019 and everything worked well.
    Please refer the attached gif files where "DockingTab1.gif" shows how controls are being added to your application's C1DockingTabPage instances. Note that the 3 pages can be accessed at design time here.
    Further, "DockingTab2.gif" shows how controls can be moved among tab pages using the Document Outline window as well.
    Do you add the controls in the same manner? Please share a video showing the issue at your end.

    Thanks,
    Esha
    GifFiles.zip
  • Replied 17 July 2019, 3:32 am EST

    Thank you for those files. I've attached a recording of the same procedure on my PC.
    Please let me know what I have done wrong.
    DockingTab.zip
  • Replied 17 July 2019, 6:22 pm EST

    Hello,

    Thanks for the video.
    The DockingTab is selected at the time you are trying to add a button to the C1DockingTabPage. I hope you are trying to explicitly select the first C1DockingTabPage before trying to add a button.
    Also, please confirm that you are using the builds from the installed directory itself i.e. C1.Win.C1Command.4.dll is being added to the References from "C:\Program Files (x86)\ComponentOne\WinForms Edition\bin\v4.0" when you drag drop C1DockingTab. In case it is not the case, please remove the Reference and add it manually from this location. Now, clean and rebuild the application before opening the form again. Let me know if this helps.

    Regards,
    Esha
  • Replied 18 July 2019, 3:11 am EST

    Yes, I am definitely trying to add the button to the first page, not the DockingTab. As mentioned, I cannot access pages 2 and 3 so I'm not able to add it to them.

    The reference is C1.Win.C1Command.4 from C:\Program Files (x86)\ComponentOne\WinForms Edition\bin\v4.0" (see attached snapshot).

    This installation is on a brand new computer and, as far as I know, the C1 installation was performed correctly. All the other controls seem to work fine.

    Thanks

    C1Ref.zip
  • Replied 18 July 2019, 8:19 pm EST

    Hello,

    Thank you for the confirmation.
    As you have a fresh machine with ComponentOne Studio installed properly, you should be able to add controls to the tab pages and access the tab pages at design time smoothly. I would request you to try one more thing and select the respective tab pages from the designer explicitly before trying to add the control. The tab pages on C1DockingTab can be specifically selected as shown in the attached gif. I am unable to see such switching among tab pages in your video. Please check if this lets you switch among the tab pages and select them individually.
    In case this does not help, share a video showing the selection of C1DockingTabPages in the similar manner and adding of controls. This would help me observe the behavior at your end.

    Thanks,
    Esha
    C1DockingTabPage_Switch.zip
  • Replied 19 July 2019, 2:35 am EST

    As you can see in the attached .avi, there is no way that I can bring up any other dockingTab pages either by clicking on the tab or by selecting it from the Properties window. It is not obvious in the .avi that I am clicking on the Tabs because the cursor is not shown, but I tried that.


    Example2.zip
  • Replied 22 July 2019, 9:12 pm EST

    Hello,

    Though remote access is provided to platinum customers, we have requested the concerned team get in touch with you to remotely access your machine and figure out the issue.

    Thanks,
    Esha
  • Replied 23 July 2019, 1:17 am EST

    I look forward to hear from them
  • Replied 23 July 2019, 2:56 am EST

    Since this problem crashed VS2019 I reported it to the Visual Studio Developer community. Below is their response:



    Hi HansGermann, Thank you for your feedback! I can reproduce your problem with your app. But when we create a default Winforms project, add a TabControl and a button control to the Form, and then move them in the Document Outline Window using mouse, there is no issue. So we think this issue was caused by DevExpress: ComponentOne. You could report this issue in here: https://www.grapecity.com/support/portal. They will support ComponentOne. Thanks, Marie
  • Replied 23 July 2019, 3:50 pm EST

    Hello,

    Thanks for the information.
    The team will get in touch with you as soon as possible.

    Regards,
    Esha
  • Replied 29 July 2019, 3:49 pm EST

    let me try again. The file is 1.6 MB. Ok Done. Thank You.
  • Replied 30 July 2019, 3:54 pm EST

    Hello,

    Do you face any issue while using our ComponentOne Studio controls?

    Thanks.
  • Replied 7 August 2019, 3:57 am EST

    Hello,

    Just updating this post to let everyone know that the DockingTab issue has been resolved over a screen share. I think there was some sort of disconnect between Visual Studio and the XML file that is supposed to accompany the DLL file. Reinstalling the studio using the offline installer (http://cdn.componentone.com/files/studioinstaller/C1Studios_20191.1.2.exe) solved the issue.

    Regards,
    Alec G.
  • Replied 15 August 2019, 5:26 am EST

    Thank you for solving that problem. Now that I've gotten past that I am encountering another problem. See attachment

  • Marked as Answer

    Replied 15 August 2019, 7:24 pm EST

    Hi Hans,

    For our WinForms controls, there are two parts to our licensing model. The first is the activation of serial key on the local dev machine (accomplished via the C1LicenseActivation utility). The second is licensing the control inside the application. (done through the Visual Studio model and licenses.licx file).
    If you've already activated your key, the issue may be with the second part.
    The easiest fix for nag screens is to note which DLL is nagging. This will be on the nag screen (IE C1.C1Report).
    1. Add a new form in your project.
    2. Open your toolbox, right click and select Choose Items.
    3. Enter the DLL and the .NET version in the filter bar (IE C1.C1Report) and it will display a list of toolbox controls in that DLL. Note them down and close the Choose Items dialog.
    4. Now drag one of each of the controls in that list onto this new form.
    As you're doing this, Visual Studio will update the licenses.licx for those controls. Once your complete, run your application.
    *If you are getting more than 1 nag screen, repeat the process for each DLL.
    You can then delete the form you created or just leave it and never instance it.

    Best wishes,
    Ruchir
  • Replied 16 August 2019, 2:46 am EST

    That solved the problem. Thank you for your help.

    Hans
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels