Skip to Content
avatar image
Former Member

Could not load file or assembly 'CrystalDecisions.Windows.Forms Error

Hello All,

I have created a Crystal Reports .Net Executable and it runs fine on the PC that it was built on. However, when I copy the exe application to another system and try to run it, I get the following error message:

System.InvalidOperationException was unhandled

Message="An error occurred creating the form. See Exception.InnerException for details. The error is: Could not load file or assembly 'CrystalDecisions.Windows.Forms, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified."

Source="Sample Report"

StackTrace:

at Sample_Report.My.MyProject.MyForms.Create__Instance__[T](T Instance) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 190

at Sample_Report.My.MyProject.MyForms.get_Form1()

at Sample_Report.My.MyApplication.OnCreateMainForm() in C:\Users\saikaleya\AppData\Local\Temporary Projects\Sample Report\My Project\Application.Designer.vb:line 35

at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()

at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()

at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)

at Sample_Report.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 78

InnerException: System.IO.FileNotFoundException

Message="Could not load file or assembly 'CrystalDecisions.Windows.Forms, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified."

Source="Sample Report"

FileName="CrystalDecisions.Windows.Forms, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"

FusionLog="WRN: Assembly binding logging is turned OFF.\r\nTo enable assembly bind failure logging, set the registry value [HKLM
Software
Microsoft
Fusion!EnableLog] (DWORD) to 1.\r\nNote: There is some performance penalty associated with assembly bind failure logging.\r\nTo turn this feature off, remove the registry value [HKLM
Software
Microsoft
Fusion!EnableLog].\r\n"

StackTrace:

at Sample_Report.Form1.InitializeComponent()

at Sample_Report.Form1..ctor()

InnerException:

Any tips/suggestions would be greatly appreciated.

P.S. I am using Crystal Reports 2008 and Visual Studio 2008.

Thank you in advance.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Nov 10, 2008 at 01:41 PM

    A couple things here:

    Your application is referencing the Windows form dll for the bundled version of Cr that comes with VS.NET 2008 and NOT the Crystal Reports 2008 runtime. You need to change the references in the project to 12.xxx assuming you have Crystal Reports 2008 SP0 installed (this is needed for it to work with .NET 2008)

    You need to make sure you deploy the runtimes for the appropriate version. If you get your application upgraded to use all of the CR 2008 runtimes you will then need to deploy the runtimes to the machine you are deploying to. You can do this by using the merge modules or the server install msi to get them on the machine.

    Jason

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 10, 2008 at 03:20 PM

    See this wiki re. correct runtime:

    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/bobj/crystalReports2008

    Ludek

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 10, 2008 at 06:22 PM

    Hello All,

    Thank you for both for your responses and both of you were correct. I needed CR for VS 2008 runtime as well as some CR dlls which I added before publishing the app within VS.

    Thank you so much.

    Add comment
    10|10000 characters needed characters exceeded