cancel
Showing results for 
Search instead for 
Did you mean: 

Backwards compatibility SP26

0 Kudos

We developed an application build with CRforVS13SP13 and deployed it to customers/clients with the same version runtime CRruntime13SP13. So no problems.

Now some customers need to upgrade to a higher version runtime 13SP26 and we do not want them to redirect the changed version numbering of SP26 in their config-files. So we decided to upgrade our Visual Studio development environment and rebuild the application with the higher version CRforVS13SP26. And this works correctly with the customers/clients with the SP26-runtime.

We expected this would still be compatible with customers/clients that continue with the old SP13, but there we see errors now. Is there no backwards compatibility in SP26 and do we now need to upgrade all other customers/clients to runtime SP26 also?

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Thank you Don,

I tried the redirection on the version numbering in the config-files as you indicated and they do work. I tried both redirections (from my 13.0.4000.0 to 13.0.3500.0 and also to 13.0.2000.0) and they both work.

Next issue is how to implement this redirection in a professional application deployment because I do not want my customers to have to edit their config-files. I would like to leave my customers free in their choise of the runtime version.
Is there a way to implement this redirection also inside my applications code. For instance at programm startup I could query the registry to find the actual installed SP-number and then based on that make a redirection of my 13.0.4000.0 to the installed SP. Can you help me with a VB.Net-code that could realise this?

Regards, Henk

Answers (7)

Answers (7)

DellSC
Active Contributor

SP13 is several years old and there have been a lot of changes in the SDK since then. Best practice is that the version used for development and the runtime should match. So, yes, you do need to upgrade the runtime when you upgrade your customers/clients to the new version of your software that was compiled with SP26.

-Dell

0 Kudos

The code just reads the registry where CR is GAC'd and displays the version.

Also, I did not add it but SP 26 is version 13.0.3500.0 so you would need to check for that version as well.

Have a great day

Don

0 Kudos

Hi Don,

I am not very familiar with your code example.
However I like your idea of "a loader program to check the registry, write/update the app.config file and then load your main application".
I am thinking to use an InstallScript in Visual Studio InstallShield to check the registry and update the app.config file during installation on the client. In that way we could distribute a universal setup and have the InstallScript change the config according to the actual runtime version on the client.
I will try some things and let you know if this will work.

KInd regards, Henk

0 Kudos

Not that I know of, since CR for VS can only have one version loaded/installed, When your app loads up it would load the app.config file, so it would be too late then.

Only way would be a loader program to check the registry, write/update the app.config file and then load your main application.

You could try this:

foreach (Assembly MyVerison in AppDomain.CurrentDomain.GetAssemblies())
{
    if (MyVerison.FullName.Substring(0, 38) == "CrystalDecisions.CrystalReports.Engine")
    {
        //File:             C:\Windows\assembly\GAC_MSIL\CrystalDecisions.CrystalReports.Engine\13.0.2000.0__692fbea5521e1304\CrystalDecisions.CrystalReports.Engine.dll
        //File:             C:\Windows\Microsoft.NET\assembly\GAC_MSIL\CrystalDecisions.CrystalReports.Engine\v4.0_13.0.4000.0__692fbea5521e1304\CrystalDecisions.CrystalReports.Engine.dll
        //InternalName:     Crystal Reports
        //OriginalFilename: 
        //FileVersion:      13.0.9.1312
        //FileDescription:  Crystal Reports
        //Product:          SBOP Crystal Reports
        //ProductVersion:   13.0.9.1312
        //Debug:            False
        //Patched:          False
        //PreRelease:       False
        //PrivateBuild:     False
        //SpecialBuild:     False
        //Language:         English (United States)

        System.Diagnostics.FileVersionInfo fileVersionInfo = System.Diagnostics.FileVersionInfo.GetVersionInfo(MyVerison.Location);
        txtRuntimeVersion.Text += fileVersionInfo.FileVersion.ToString();
        // check if CrsytalDecisions.Enterprise dll's can be loaded ( Anything but Cortez - managed reporting )
        if (fileVersionInfo.FileVersion.Substring(0, 2) == "13")
        {
            btnRasOpen.Enabled = false;
        }
        CRVer = fileVersionInfo.FileVersion.Substring(0, 2);
        //return;

        object[] attribs;
        // check if debug mode
        try
        {
            var assembly = Assembly.LoadFrom(@"C:\Windows\assembly\GAC_MSIL\CrystalDecisions.CrystalReports.Engine\13.0.2000.0__692fbea5521e1304\CrystalDecisions.CrystalReports.Engine.dll");
            attribs = assembly.GetCustomAttributes(typeof(DebuggableAttribute), false);
        }
        catch
        {
            var assembly = Assembly.LoadFrom(@"C:\Windows\Microsoft.NET\assembly\GAC_MSIL\CrystalDecisions.CrystalReports.Engine\v4.0_13.0.4000.0__692fbea5521e1304\CrystalDecisions.CrystalReports.Engine.dll");
            attribs = assembly.GetCustomAttributes(typeof(DebuggableAttribute), false);
        }


        // If the 'DebuggableAttribute' is not found then it is definitely an OPTIMIZED build
        if (attribs.Length > 0)
        {
            // Just because the 'DebuggableAttribute' is found doesn't necessarily mean
            // it's a DEBUG build; we have to check the JIT Optimization flag
            // i.e. it could have the "generate PDB" checked but have JIT Optimization enabled
            DebuggableAttribute debuggableAttribute = attribs[0] as DebuggableAttribute;
            if (debuggableAttribute != null)
            {
                bool HasDebuggableAttribute = true;
                var IsJITOptimized = !debuggableAttribute.IsJITOptimizerDisabled;
                var BuildType = debuggableAttribute.IsJITOptimizerDisabled ? "Debug" : "Release";

                // check for Debug Output "full" or "pdb-only"
                var DebugOutput = (debuggableAttribute.DebuggingFlags &
                                DebuggableAttribute.DebuggingModes.Default) !=
                                DebuggableAttribute.DebuggingModes.None
                                ? "Full" : "pdb-only";
            }
        }
        else
        {
            var IsJITOptimized = true;
            var BuildType = "Release";
        }
    }
}

Don

0 Kudos

Hi Henk,

There is backward compatibility, that is what the KBA is for. Just rename the xml file to the your EXE as described in the KBA and place it in your EXE folder. You can set the redirect to any older version you want.

Did you read the KBA? Here's a link if you did not use Google to search for it:

https://launchpad.support.sap.com/#/notes/2719939

Don

0 Kudos

It is very disappointing that there is no backwards compatibility for service packs.

What then to do with the following customer/client situation:
- they presently use our application (say AppA) with the SP13 runtime;
- now they want to install another application (say AppB) from another supplier that demands the SP22 runtime;
- This obviously conflicts with our SP13 so the customer requested us to upgrade;
- We decided to upgrade AppA to the most recent version SP26, also to be ready for future demands of other customers of AppA;
- And now because SP26 is not backwards compatible, we have to demand the customer to install of SP26, what in turn will inhibit their use of AppB again.

This leads to ongoing future conflicts when customers use different applications with different runtime service packs. And a fix in the config-file is OK for a single case but not acceptable in a professional deployment.
I would sincerely hope there is a better solution to this problem.

0 Kudos

See the download WIKI, you can use an app.config file so they can use SP26 and use a redirect for 2.0 framework.

https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads

Search for this KBA -

2719939 - Crystal Reports for Visual Studio Runtime versioning - side by side ability - what to do with WinFormCRViewer.zip from download WIKI

Don