c#部署安装文件,无法加载文件或程序集'crystaldecisiations . windows . form

本文关键字:文件 crystaldecisiations windows 程序集 form 加载 安装 部署 | 更新日期: 2023-09-27 18:11:01

我使用Add->安装项目部署我的系统,然后我成功地在我的另一台计算机上安装了系统,数据库工作正常,但是当我试图加载水晶时,出现了错误信息:

无法加载文件或程序集" crystaldecisiations . windows . forms . version =13.0.2000.0. "文化=中立

有人能帮我吗?

在网上搜索问题后,我发现需要安装水晶报告引擎,所以我下载并安装,但现在错误变成:

*

************* Exception Text **************
System.MissingMethodException: Method not found: 'Void CrystalDecisions.Windows.Forms.CrystalReportViewer.set_ShowCopyButton(Boolean)'.
   at ProjectOCJB.Payment.InitializeComponent()
   at ProjectOCJB.Payment..ctor()
   at ProjectOCJB.Form2.pictureBox2_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.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)

************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.586 (RTMLDR.030319-5800)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
ProjectOCJB
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/Setup/ProjectOCJB.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.2003 built by: RTMLDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.2001 built by: RTMLDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.2001 built by: RTMLDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Data
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 built by: RTMRel
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 built by: RTMRel
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
CrystalDecisions.Windows.Forms
    Assembly Version: 13.0.2000.0
    Win32 Version: 13.0.1.220
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.Windows.Forms/13.0.2000.0__692fbea5521e1304/CrystalDecisions.Windows.Forms.dll
----------------------------------------
CrystalDecisions.CrystalReports.Engine
    Assembly Version: 13.0.2000.0
    Win32 Version: 13.0.1.220
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.CrystalReports.Engine/13.0.2000.0__692fbea5521e1304/CrystalDecisions.CrystalReports.Engine.dll
----------------------------------------
CrystalDecisions.Shared
    Assembly Version: 13.0.2000.0
    Win32 Version: 13.0.1.220
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.Shared/13.0.2000.0__692fbea5521e1304/CrystalDecisions.Shared.dll
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

c#部署安装文件,无法加载文件或程序集'crystaldecisiations . windows . form

您必须下载可重新发布的crystal报告包,取决于visual studio的版本

http://scn.sap.com/docs/doc - 35074

在之前的版本中,你必须在app.config

中添加这个
<startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0" />
</startup>
<startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
</startup>