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

This question is answered

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 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."

Former Member

November 10, 2008 at 19:22 PM

0
Likes

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.