c1PrintPreviewControl Error

Posted by: gessi on 21 September 2017, 10:02 pm EST

    • Post Options:
    • Link

    Posted 21 September 2017, 10:02 pm EST

    Hi

    In an empty winform a placed a c1PrintDocument1 and after that I tried to insert a C1PrintPreviewControl. I received this message:. My latest version is 4.0.20172.271.

    What’s wrong?

    best regards

    Peter

  • Posted 24 September 2017, 4:29 pm EST

    Hi Peter,

    The MissingMethodException can occur when there is an old version of a C1.Win.C1Document.4.dll still lingering somewhere around. Make sure that the latest assemblies are correctly installed and no duplicated older assemblies are hiding in certain folders. In particular, be sure an old version of C1Document dll is not in the GAC.

    The C1DXTextMeasurementContext class has a new constructor accepting an argument of type C1.Util.DX.DirectWrite.Factory since May/June 2016.

    Thanks,

    Pragati

  • Posted 24 September 2017, 11:57 pm EST

    Hi

    I searched for C1.Win.C1Document all my directorys (win\assembly too), but there were no C1.Win.C1Document.4.dll except those used by AppData.

    I think it’s the best to completly uninstall componentone and clearing VS2017 too from any components. After that I install componentone again.

    What do you think about this?

    best regards

    Peter

  • Posted 25 September 2017, 2:38 am EST

    Hi

    I still get the same error! I did the following steps:

    1. I run ComponentOneCleaner20161.1.5.exe
    2. I removed each componentone, winforms etc. entry in the registry
    3. I had a look on VS2017. No componentone components were to be found.
    4. I reboot
    5. I installed componentone studio by C1StudiosWebInstallerv20172.1.14.exe
    6. I licenced this installation
    7. I opened a new project in VS2017 and installed all WinForms4-controls
    8. I drag the c1PrintDocument to the form and finally c1PreviewControl and then the error happend!

    I don’t know what to do. I hope you can help me.

    best regards

    Peter

  • Posted 25 September 2017, 11:41 pm EST

    Hi

    I think I’ve found why I run into troubles. Looking at the references I found some elements with the following path:

    C:\Program Files (x86)\ComponentOne\ASP.NET Web Forms Edition\bin\v4

    Replacing all the elements with the dll’s from …\WinForms Edition\bin\v4.0

    everything works well.

    How can I resolve this ASP.NET and WinForms mismatch. I told you in my previous post that I uninstall all componentone components and clearing all componentone elements in the registry too.

    What can I do?

    Yours

    Peter

  • Posted 27 September 2017, 4:02 pm EST

    Hi Peter,

    Thank you for sharing your findings.

    The problem is because the Winforms dlls in the “ASP.NET Web Forms Edition” folder and the “WinForms Edition” folder are different and because the way VS searches for dlls in the registry .Please upgrade your ASP.NET WebForms to match the version of Winforms installed on your machine. The problem will no longer occur.

    I am sorry but there is no other solution.

    Thanks,

    Pragati

  • Posted 28 September 2017, 7:49 am EST

    Hi Pragati

    I’m sorry, but your advice didn’t work. I started live and made an ‘update all products’ although all products were installed with its latest version. So I startet VS and looked at the properties of C1Report, C1.Win4, C1PDF etc. Each path was set to ASP and of course I got an error.

    I thought to reinstall all my componentone as I wrote in one of my last posts but unfortunately I wasn’t able to uninstall. Neither ‘uninstall programs’ nor your ComponentOneCleaner20161.1.5.exe didn’t work. The Cleaner reportes a log file - see attachment ‘C1Cleaner.ZIP’.

    I really don’t know what I can do!

    Please, I need your help badly!

    regards PeterC1Cleaner.zip

  • Posted 28 September 2017, 10:51 pm EST

    Hi Peter,

    Thanks for sharing the log.

    This happens when the name of the WinForms Edition’s folder has been changed. And since the name of the WinForms and Asp.Net Web Forms edition dlls are same, Visual Studio replaces the WinForms dlls with the asp.net ones.

    Therefore, in order to resolve the issue, could you please go to C:\Program Files (x86)\ComponentOne and rename the Winforms Edition folder to WinForms Edition. And after that, open your application in Visual Studio, replace all the dlls present in your application with the dlls present inside C:\Program Files (x86)\ComponentOne\WinForms Edition\bin\v4.0

    Hope this resolves your issue.

    Regards,

    Ruchir Agarwal

Need extra support?

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

Learn More

Forum Channels