Skip to Content

CR Redisrtibuatable & Visual Studio

I am using VS 2017 (15.7.3) with Crystal Reports for >NET Framework installed. I am developing a windows forms add-in for Outlook. When I add a report viewer to a form it adds references to the various DLLs - all version 13.0.35.

On my dev machine all works as expected but I made a Visual Studio setup project and included the Prerequisite for Crystal Reports. This installs 13.0.24 DLLs on my target machine and when my form tries to show the report viewer I get an error "The type initializer for CrystalDecisions.CrystalReports.Engine.ReportDocument threw an error" The inner exception is cannot load or find CrystalDecisions.ReportAppServer.CommLayer version = 13.0.3500.0.

So it seems the references installed to Visual studio want version 13.0.35 while the version installed by the prerequisite is 13.0.24. How can I either add the right version to Visual Studio or get the redistributables for 13.0.5?

Thanks.

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • Best Answer
    Posted on Feb 27, 2019 at 06:48 PM

    13.0.3500.0 is the version of CR Assemblies, it's not the version of the dll's. 13.0.24.xxx is the version of the dll's.

    It's possible the framework version needs to be added to Outlook so it starts up using the same framework.

    To start Crystal Reports DEsigner in 4.0 framework follow this KBA ( search for it using Google )

    1525014 - Sample C# .NET UFL and Localization Formula function

    It's how Windows works so create the same xml file for Outlook and place the xml file where outlook.exe resides

    Change the framework version to be the same version you created the plug-in in VS.

    And Dell is correct, CR runtime is for your app and not the OS Platform, set your project for X86, unless you are using a 64 bit version of Office/Outlook.

    Don

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 26, 2019 at 08:00 PM

    Are you using one of the runtime installs or are you including the .dll files in your application install? You MUST use one of the runtime install packages and it needs to be installed while logged in with Administrator rights. The .NET SDK has a number of dependencies that are in separate files from the ones you reference in your application. Also, there are several registry settings that are required for it to run correctly. Go to the page where you downloaded the integration for VS and use one of the blue buttons to download the appropriate runtime to go with your application. You can get to the download link through this page: https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads

    -Dell

    Add a comment
    10|10000 characters needed characters exceeded

    • Yes I was logged in as admin on the target machine. It is running Windows 10. Crystal Reports 13.0.4 seems present in the GAC_64 and in Program files (x86)\SAP Business Objects\CrystalReports for .NET Framework 4.0. There are Registry entries under LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal reports and one of the keys indicates CRRuntime64 version of 13.0.24.

      Can I install 13.0.24 on my dev machine? Would that solve the problem?

  • Posted on Feb 27, 2019 at 05:12 PM

    Is your application specifically targetting the "Win64_X64" platform? If not, try recompiling it with that property instead of "Any CPU". Or, if your application targets Win32_X86, you need to have the 32-bit version of the SDK installed - the SDK bit-ness is based on the application, not the OS.

    -Dell

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 28, 2019 at 01:06 PM

    Thanks Guys. Yes the app is compiling for AnyCPU. It was targeting .NET 4.5.1 so I changed it to plain .NET 4.0 but it did not make any difference. I still got the same error on the target machine. I've not had time to try your XML file suggestion, Don. I'll give it a go later.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.