Skip to Content
Technical Articles

Upgrading a Visual Studio 2008->2019 .NET project with the latest BOE/CRS/CRS(OEM).NET SDK packages

Purpose

To assist Project Developers upgrading an older project with the latest Service Packs of BusinessObjects Enterprise, Crystal Reports Server and Crystal Reports Server (OEM).

Note: all of the .NET SDK packages are the same for each Product listed above.

If you are using Crystal Reports for Visual Studio, no connection to BOE see this WIKI

Overview

When upgrading you BOE Server you MUST upgrade the .NET SDK packages to the same version.

You can get the 64 bit MSI Package from the Client Install, you will need to download the x86 bit MSI from the Support portal. Requires a Support Contract to access the download page.

There are a few things you need to do after first opening your project. Visual Studio does not do a complete upgrade of the CR/BOE Assemblies.

BOE minimum Framework version is based on the version noted:

14.0.2000.0 = 2.0 Framework

14.0.3500.0 = 3.5 Framework

14.0.4000.0 = 4.x Framework

With the latest patches we recommend using 4.7.2 framework or higher.

Note: see this Blog for upgrading Crystal Reports for Visual Studio .NET projects

Uninstalling the previous version

If upgrading from CR 2008 runtime, note the runtime is no longer in the BusinessObjects folder.

If your original project is using BOE .NET runtime, then the first thing you need to do is download the latest SP which you can get from here

Note: As of CR 2011 we no longer install the Any CR/BOE .NET runtime with CR Designer, it’s a separate install now either using the Client Tool installer or by downloading the MSI packages from the link above.

Uninstall any older MSI’s installed on your Development PC, in the screen shot below I have updated already. Both 32 and 64 bit MSI’s need to be removed:

Note: BOE is installed on this PC so if you do this you may need to repair the BOE Server install.

Typically the Application is installed on the APP/WEB Server.

Also note: VS 2008 will not use BOE .NET, you need to upgrade to VS 2010->2019.

Installing the same version of .NET as your BOE/CRS/CRSE 

This is a MUST do, you cannot mix versions of BOE and .NET runtime, we do not support this at all so when you upgrade your BOE Server you also need to upgrade your application.

Log into your Development PC as a local Administrator, this is must due to Windows security and to properly register the COM dll’s and Registry Keys we create. Install both x86 and x64 MSI packages. Note: the Client Tools in 4.3 installer does not install the 32 bit MSI package, you MUST do this manually or you will get errors if you use the Viewer.

On rare occasions you may want to re-boot your PC, sometimes the runtime is “locked” and a reboot is required to finish the update. And a Repair may need to be done.

Now that you have the runtime updated here is an example of what you may run into.

THE APPLICATION example:

You will find the CR/BOE dll’s here, I recommend using the .NET tab or Extensions when adding them to your project, much cleaner:

C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet\iPoint

X64 his here:

C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\win64_x64\dotnet\iPoint

Open your Project, in this instance the app was created in VS 2010 and now opening in VS 2019:

You have the option to backup, I suggest making a copy first and not making a backup, but it’s up to you how you manage the old and new versions.

Now you may have issues with the CR Windows Form Viewer. Don’t fix it when it first appears, it will be resolved later:

Now change your Framework version to 4.7.2:

And the platform to either x86 or x64, it’s on the Build* list. CR runtime is configured for your application platform and not the OS.

Now check the references.

To upgrade your references, first take a screen shot of your existing assemblies:

Delete them all unless they point to the latest version 14.0.4000.0.

Also note: Since BOE 4.3 doesn’t allow having the Client tools installed you will not be able to add the Designer back in, you must Run Universe Designer once so it generates the dependencies and then can be added to your Project.

Now you need to add the new Assemblies, VS doesn’t seem to work very well at updating them but depends on versions.

Note: if you have Windows Form with the Viewer embedded in it you’ll see an error on the form. once you update the assemblies and add the Viewer to the list the error should go away.

Now that you have the all or most of the Assemblies added back in you’ll need to adjust the Interopt and Copy Local properties:

Add the new Assemblies by clicking on the Extension option, Do NOT browse to the files, much cleaner using the VS interface into the GAC

Note the full path and it’s pointing to the x86 folder, because VS is a 32 bit application select x86 first.

As you add each one confirm they are all from the x86 folder, he may see the path to the X64 folder listed.

Note: as of BOE 4.2 SP 8 and 4.3 SP0 we now register the Assemblies into GAC using this folder:

C:\Windows\Microsoft.NET\assembly

Previous versions were placed in this folder:

C:\Windows\assembly

To add the new CR Windows viewer right click on the ToolBox and select Choose Items….

Now you’ll see the CR viewer in the Toolbox list and note it should be version 13.0.4000.0:

 

You may get some kind of error so you may have to re-add the Viewer to your Form.

Ready to build THE APPLICATION:

Ok, now that we have all of the references, mostly, updated it’s time to rebuild your project.

Click on the Build menu and select Rebuild…

Now clean the Build and then rebuild the project and you will likely get these types of errors:

After you have updated the Assemblies set the Interopt to False, depends on the assemblies added as to which it is set to, when building the project you will get a message if the Assembly needs to have the Interopt changed.

In this instance I am setting all Interopt’s to false and setting the copy local to false as well:

And change the Copy Local to False, the reason is if you update your runtime you want the application to load from our folders/GAC, having the files copied to your \bin folder can cause runtime issues because of mixed version.

Also note: When changing to X64 in the project references will still point to the x86 folder, when distributed it will use the x64 versions:

Here’s a look at my \bin folder, notice not CR/BOE dll’s are in there:

Note, they are warnings, if one does need it changed it will show up as an Error.

Mostly the RAS components will need the interopt set to false.

So depending on what parts you are using depends on the setting, keep trying until it runs.

Updating THE APPLICATION app.config file:

OK so now that the app is built it’s time to possibly fix your app.config file.

Previous to SP 29 the config file included the CR assemblies.

Since we changed the location of the Assemblies to here, C:\Windows\Microsoft.NET\assembly

the config file should now have no references to the assemblies included. If it does you can remove them:

<?xml version="1.0"?>
<configuration>
<configSections>
  <sectionGroup name="businessObjects">
    <sectionGroup name="crystalReports">
      <section name="crystalReportViewer" type="System.Configuration.NameValueSectionHandler"/>
    </sectionGroup>
  </sectionGroup>
</configSections>
  <!--connectionStrings>
    <add name="Unmanaged_RAS10_CSharp_Printers.Properties.Settings.ConnectionString"
        connectionString="Provider=SQLOLEDB;Data Source=10.167.13.19;Password=1Oem2000;User ID=sa;Initial Catalog=xtreme"
        providerName="System.Data.OleDb" />
</connectionStrings>-->
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/></startup>
	<runtime>
		<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
			<dependentAssembly>
				<!-- <assemblyIdentity name="System.Web.Services" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/> -->
				<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
			</dependentAssembly>
		</assemblyBinding>
	</runtime>
<!--  
  <businessObjects>
    <crystalReports>
      <crystalReportViewer>
        <add key="AntiAlias" value="true"/>
      </crystalReportViewer>
    </crystalReports>
  </businessObjects>
-->
</configuration>

If you were using the ADO.NET(XML) client DB driver due to legacy changes in older versions you had to redirect to use Legacy mode.

Since 4.2 SP 4 and 4.3 this is no longer required so remove this from your Config file if it exists:

<startup useLegacyV2RuntimeActivationPolicy="true">

Note: If you change the Project to build in x64 mode all of the Assemblies now show the 64 bit location:

Web Application:

To upgrade your WEB app do the same as above, add the CR WebForm viewer to the tool bar and then drag and drop it onto his web page. Delete the old one first.

A quick test using this to start with.

Create a new Project and select empty, select the Crystal Reports, (NOT the MS Report project) in the webform1.aspx it should look something like this:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
using CrystalDecisions.ReportSource;

namespace WebApplication1
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Init(object sender, EventArgs e)
        {
            CrystalDecisions.CrystalReports.Engine.ReportDocument rpt = new ReportDocument();
            rpt.Load(@"D:\Atest\report1.rpt"); 
            CrystalReportViewer1.ReportSource = rpt;
        }
    }
}

 

Be the first to leave a comment
You must be Logged on to comment or reply to a post.