Building .NET Application for Different Versions o

2019-05-24 14:05发布

How Can i Build a .NET Application targeting different versions or probably the lower versions of the Crystal Report in Visual Studio .

The Client Machine contains the Crystal Report 9 runtime as well as designer installed .

Now is it run a .NET Application that uses Crystal Report Components in Visual Studio 2008 / 2010 that targets Crystal Report 9 without installing any Additional Runtimes apart from the above . If yes how?

1条回答
成全新的幸福
2楼-- · 2019-05-24 14:42

You can use this XML in your app.config or web.config:

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

in atribute "oldVersion" you have to put the version which you want to substitute for the version in the atribute "newVersion"

查看更多
登录 后发表回答