我用Crystal Reports 10开发了一个项目并开发了一个可以很好地生成pdf文件的设置但是当我在任何其他机器上安装这个应用程序并尝试运行pdf生成时,我得到了这个例外:
有关调用的详细信息,请参阅此消息的结尾 实时(JIT)调试而不是此对话框。
************** Exception Text **************
System.IO.FileNotFoundException: Could not load file or assembly 'CrystalDecisions.CrystalReports.Engine, Version=10.0.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.
File name: 'CrystalDecisions.CrystalReports.Engine, Version=10.0.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304'
at WindowsApplication1.frmPaySlip.ShowReportSalaryStatement(DataSet ds, String toadd, String rep)
at WindowsApplication1.frmPaySlip.pdfgenerator(String rep, String toadd)
at WindowsApplication1.frmPaySlip.btnOK_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
我几乎尝试过在网上找到的所有可能性但无法整理出来。
答案 0 :(得分:0)
我解决了这个问题。水晶报告的参考是指dll的另一个版本,所以它在机器上运行良好,并为其他机器抛出错误。我清除了所有参考文献并重新提交了所有dll的水晶报告并重建了它现在正常工作的设置