【问题标题】:Building .NET Application for Different Versions of Crystal Report in Visual Studio 2010在 Visual Studio 2010 中为不同版本的 Crystal Report 构建 .NET 应用程序
【发布时间】:2010-07-26 17:25:43
【问题描述】:

如何在 Visual Studio 中构建针对不同版本或可能较低版本的 Crystal Report 的 .NET 应用程序。

客户端计算机包含 Crystal Report 9 运行时以及安装的设计器。

现在它运行一个 .NET 应用程序,该应用程序使用 Visual Studio 2008 / 2010 中的 Crystal Report 组件,该组件针对 Crystal Report 9,而无需安装除上述之外的任何其他运行时。如果是怎么办?

【问题讨论】:

    标签: .net visual-studio-2010 crystal-reports


    【解决方案1】:

    您可以在 app.config 或 web.config 中使用此 XML:

      <runtime> 
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <dependentAssembly>
            <assemblyIdentity name="CrystalDecisions.CrystalReports.Engine" publicKeyToken="692fbea5521e1304" culture="neutral"/>
            <bindingRedirect oldVersion="13.0.2000.0" newVersion="12.0.2000.0"/>
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="CrystalDecisions.Shared" publicKeyToken="692fbea5521e1304" culture="neutral"/>
            <bindingRedirect oldVersion="13.0.2000.0" newVersion="12.0.2000.0"/>
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="CrystalDecisions.ReportSource" publicKeyToken="692fbea5521e1304" culture="neutral"/>
            <bindingRedirect oldVersion="13.0.2000.0" newVersion="12.0.2000.0"/>
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="CrystalDecisions.Windows.Forms" publicKeyToken="692fbea5521e1304" culture="neutral"/>
            <bindingRedirect oldVersion="13.0.2000.0" newVersion="12.0.2000.0"/>
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="CrystalDecisions.Enterprise.Framework" publicKeyToken="692fbea5521e1304" culture="neutral"/>
            <bindingRedirect oldVersion="13.0.2000.0" newVersion="12.0.1100.0"/>
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="CrystalDecisions.Enterprise.InfoStore" publicKeyToken="692fbea5521e1304" culture="neutral"/>
            <bindingRedirect oldVersion="13.0.2000.0" newVersion="12.0.1100.0"/>
          </dependentAssembly>
        </assemblyBinding>
      </runtime>
    

    在属性“oldVersion”中,您必须将要替换的版本放入属性“newVersion”中

    【讨论】:

    • 我想在生产服务器上使用版本“13.0.2000.0”,而在开发服务器上安装版本“10.2.3600.0”。但是,当在 web.config 中添加上述行(具有正确版本)时,它会显示 500 错误。有什么建议让它对我有用吗?
    • 你怎么知道正确的 publicKeyToken 值是多少?
    猜你喜欢
    • 1970-01-01
    • 2014-02-06
    • 2014-05-25
    • 1970-01-01
    • 1970-01-01
    • 2012-10-08
    • 1970-01-01
    • 1970-01-01
    • 2019-02-18
    相关资源
    最近更新 更多