cancel
Showing results for 
Search instead for 
Did you mean: 

Keycode assembly (Licensing.KeycodeDecoder.dll) cannot be loaded

Former Member
0 Kudos

I apologize if this has been posted about before here but in searching I can't find a reference to his with my exact same circumstances. I've seen posts regarding this for ASP sites and JAVA applications but not one specifically pertaining to a WinForms application.

I'm deploying a VS2010 WinForms application using CRVS2010 to a clean virtual 32-bit WinXP SP3 machine. I've installed the 32 bit CR runtime (CRRuntime_32bit_13_0.msi) along with my application, but previewing the report still generates an unhandled exception with the following entry from Crystal Reports in the Windows Application Event Log:

The description for Event ID ( 4353 ) in Source ( Crystal Reports ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: The keycode assembly, BusinessObjects.Licensing.KeycodeDecoder.dll, cannot be loaded.

These same reports all run fine under the VS2010 IDE on my development machine. Is this a known error in the CR runtime and WinForms or have I missed something in the deployment process?

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

Yup. A known issue. I placed a note into [this|] thread with the details. Note that as irritating as this error / warning is, it does not impact the behavior or functionality of the app.

Ludek

Former Member
0 Kudos

Thank you for your response, and clearly you and I have different definitions of what "impact" means

I saw the "does not impact" in that thread and that is why I started a new thread as my app is terminating with an unhandled exception. The program builds a dataset and attaches it to a report definition then passes that to a new WinForm that has a crystal report preview control on it. At that point the RTE appears and the app is shut down.

The build/display preview code is in a try/catch block, and the application as a whole has a defined unhandled exception handler routine. Neither of these is being triggered.

After the crash, the Windows Event log, there's an error from CR (referenced in my earlier pos) then an error from .NET an info from .NET and one final error from .NET:

Framework Version: v4.0.30319

Description: The process was terminated due to an unhandled exception.

Exception Info: System.IO.FileNotFoundException

Stack:

at System.Reflection.RuntimeAssembly._nLoad(System.Reflection.AssemblyName, System.String, System.Security.Policy.Evidence, System.Reflection.RuntimeAssembly, System.Threading.StackCrawlMark ByRef, Boolean, Boolean, Boolean)

at System.Reflection.RuntimeAssembly.nLoad(System.Reflection.AssemblyName, System.String, System.Security.Policy.Evidence, System.Reflection.RuntimeAssembly, System.Threading.StackCrawlMark ByRef, Boolean, Boolean, Boolean)

at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(System.Reflection.AssemblyName, System.Security.Policy.Evidence, System.Threading.StackCrawlMark ByRef, Boolean, Boolean)

at System.Reflection.RuntimeAssembly.InternalLoadFrom(System.String, System.Security.Policy.Evidence, Byte[], System.Configuration.Assemblies.AssemblyHashAlgorithm, Boolean, Boolean, System.Threading.StackCrawlMark ByRef)

at System.Reflection.Assembly.LoadFrom(System.String)

at CrystalDecisions.ReportAppServer.DataSetConversion.DataSetConverter.DataSetProcessingDelegate(IntPtr)

Any suggestions to prevent the RTE from crashing the app or perhaps letting my application's unhandled exception handler kick in?

0 Kudos

Hello,

Are you using adoplus as your DB driver? If so see this [thread |]to set it to LegacyMode:

These may be two separate issues.

Thank you

Don

Former Member
0 Kudos

I'm using System.Data.SqlClient (SqlConnection, SqlCommand, SqlDataAdapter) to create a DataSet for the report.

And I apologize, after checking the application startup I did find that the unhandled exception handler was still in debug mode (disabled) so I re-enabled it. It caught the following error on the next run but the application was still shut down:

System.IO.FileNotFoundException: Could not load file or assembly 'file:///C:\Program Files\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet1\crdb_adoplus.dll' or one of its dependencies. The system cannot find the file specified.

File name: 'file:///C:\Program Files\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet1\crdb_adoplus.dll'

at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)

at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)

at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks)

at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)

at System.Reflection.Assembly.LoadFrom(String assemblyFile)

at CrystalDecisions.ReportAppServer.DataSetConversion.DataSetConverter.DataSetProcessingDelegate(IntPtr arg)

Which does seem to be referencing some ADO library. Additionally, I also checked my app.config file and it already contained the following entry:

<startup useLegacyV2RuntimeActivationPolicy="true">

<supportedRuntime version="v4.0"; sku=".NETFramework,Version=v4.0";/>

</startup>

Suggestions?

former_member183750
Active Contributor
0 Kudos

Umm, Richard, note that in your original post you did not mention that the app was terminating with an unhandled exception...

As I mentioned, the error re. Licensing.KeycodeDecoder.dll does not affect your app. The app terminating and the Licensing.KeycodeDecoder.dll issue are not connected and I addressed the issue reported in the 1st post...

To move on.

1) As you will need to be using LegacyMode, ensure that framework 2.x is installed on that computer

2) Look in the bin directory (C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86) for crdb_adoplus.dll. Is it there?

3) Use [Process Monitor|http://technet.microsoft.com/en-ca/sysinternals/bb896645.aspx] to find out what is happening at the point where the app is attempting to load the crdb_adoplus.dll

- Ludek

Edited by: Ludek Uher on Dec 31, 2010 12:49 PM

Former Member
0 Kudos

Ludek,

From my original post:

... but previewing the report still generates an unhandled exception with the...

Perhaps I should have bolded it. That is why I started a new post as the other ones indicated the preview was still displayed after the error was thrown: That is not happening in my case, it is killing the entire application when it tries to create the WinForm with the preview control on it.

As for your queries:

1) The machine is a virtual fully patched WIN XP Pro SP3 with the 2.x, 3.5 and 4.0 frameworks installed.

2) The crdb_adoplus.dll file is there and is version 14.0.2000.99 (585,728 bytes).

3) I'm not sure what the process monitor is going to tell you that the recorded events I posted earlier did not. If there is something specific from the process monitor that you would like to see please let me know.

Thanks, and I'll check back in after the New Year!

- Richard

.

0 Kudos

Hi Richard,

That is the cause. You had the beta build version 14 on this PC at one time and it's causing the problem. The RTM build is version 13.0.0.99

If you can wipe the PC or create a new VM-ware image, if not then uninstall all CR versions in the reverse order you installed them in and then delete the BusinessObjects and Crystal Reports folders and then go into reg edit and delete all of the BusinessObjects and Crystal Reports keys.

Usual warning about manually editing the registry.

Good luck

Don

Former Member
0 Kudos

Don,

Thanks for the info, and the base VM is a clean fully patched OS with no frameworks on it, I install everything from that so there is no chance it had a beta build. I'm using the only runtime for CRVS2010 download that i've been able to find on your site.

Do you have a link to the RTM runtime installer files for the version that you mentioned?

Thanks in advance,

- Richard

0 Kudos

Hi Richard,

Odd, you must have used some old link to get the beta runtime.

Go to this link to get all of the updates:

http://www.sdn.sap.com/irj/sdn/crystalreports-dotnet

Download Crystal Reports for Visual Studio 2010

  • Complete Package (EXE)

  • Click Once

  • Merge Modules

  • Redist Installation (32 bit)

  • Redist Installation (64 bit)

Bottom of the page.

Thanks again

Don

Former Member
0 Kudos

Don,

Not sure what the deal is, but here are the steps I followed:

1) Uninstalled the CR Runtime via win control panel. Manually removed the SAP folder from my program files folder. Rebooted.

2) Downloaded the zip from your link with the CRRuntime_32bit_13_0.msi in it.

3) Installed it. Rebooted.

4) Checked the crdb_adoplus.dll file and it does indeed show product version of 13.0.0.99 but a file version of 14.0.2000.99 (which is what i reported earlier).

5) Attempted to run the report again with the same error produced at the same point.

Have any other suggestions for me?

Thanks in advance,

- Richard

0 Kudos

Hi Richard,

Sorry, my mistake. That one file did not get re-versioned.... it is still version 14....

Try this thread to see if changing the Project build options to no include CR dependencies works for you:

Thank you

Don

Former Member
0 Kudos

Don,

I appreciate the suggestion but I'm not using click-once to deploy, I'm using [Advanced Installer|http://www.advancedinstaller.com] to deploy the application.

I've specified the CR2010 RTE as a prerequisite to our software installation in the install script (If the installer does not see a particular registry key then it will launch your MSI before it continues).

As far as the actual project, I've made sure all of the references in project are for version 13:

CrystalDecisions.CrystalReports.Engine - 13.0.2000.0

CrystalDecisions.ReportSource - 13.0.2000.0

CrystalDecisions.Shared - 13.0.2000.0

CrystalDecisions.Windows.Forms - 13.0.2000.0

Got something else I can look at?

- Richard

0 Kudos

Hi Richard,

We've never tested our deployment with that tool so not sure what is going to happen... You could ask them how to remove references through their tool or if it will read VS .NET's Project settings.

For now use VS to build the project and remove the CR assemblies as per Dave's work around.

Thank you

Don

Former Member
0 Kudos

Don,

Help me to understand your thought process here.

The installer program only has references that are added to it. Since the only reference I've added to it is your installer MSI (as a prerequisite, not even actually part (i.e. merge module) of our application's install) you can be positive that nothing else related to CR is getting installed that is not in your supplied MSI file.

If you want me to remove all references to CR in the deployment settings and then use one-click to deploy; how is that different from what I am doing currently? I did remove all references and rebuild the project before the last test, and it did not affect the outcome. Assuming you have all the necessary .NET frameworks installed and your CR Runtime installed you should be able to take a compiled EXE with a report and preview control and run it with no problems, yes?

Is there some additional file(s) that I haven't been able to find that one-click deploys that would prevent this error? I even went so far as to manually uninstall and reinstall the runtime MSI which had no effect. Are there some other files that need to be deployed along with the runtime?

0 Kudos

Hi Richard,

We are still trying to duplicate the issue in house, for some yet unknown reason we can not duplicate this deployment issue.

What we have discovered so far is that in your Project settings remove all references to log4net and CR assemblies then which ever way you deploy the runtime there should not be any problems. But as I said we've never tested using that distribution/deployment tool so not sure what the outcome will be.

The other option is to not use the Click Once and use the MSI and include it in your package, this much we do know seems to work. But again, we have not been able to duplicate the problem so we can't verify what the cause is.

Thanks again

Don

Former Member
0 Kudos

Don,

Ok, after you said you couldn't replicate it I started making a new 2010 project (rather than one upgraded from VS2005 whcih this one is) to just display a simple dataset on a CR Preview screen.

It was at that point that I found I have two different CR Viewers in my toolbox, one of which is grayed out (even with the target framework set to 4.0 and not 4.0 Client). I have to click the "show all" option in the tool box to see the "Crystal Reports" tab, and the 14.x version one shows up under the default VS "Reporting" tab. I did check my add/remove programs and only the 13.x version is listed so I'm sure the beta is not installed.

[Click Here to see a screen cap of the toolbox|http://www.phx-is.com/images-web/CRViewers.png]

The one that is NOT grayed out is version 14.0.2000.0 and the one that IS grayed out is 13.0.2000.0. In checking my project, I have determined that the report viewer container in my program is pointing to:

C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet\CrystalDecisions.Windows.Forms.dll

Which shows a version of 13.0.2000.0 in my References for the project. However, the 13.0.2000.0 control on my toolbox remains grayed out, which confuses me even more.

Where to go from here?

-


On a probably unrelated note: Writing this test program, I also discovered that VS would lock up when I selected "Database Expert" option under "Database Fields' in the report designer ([See this thread|😉 but following the advice in that thread and renaming my "C:\Temp" folder solved that problem.

Edited by: Richard Wolf PIS on Jan 5, 2011 12:55 AM

Former Member
0 Kudos

Don et. al.,

Creating the test program allowed me to find the solution!

The test program worked fine when I copied it to my test box, so I double-checked the main application's install again. Prior to VS2010 the application did not have ".config" file in it. VS2010 added one and I did not grab that in the installation set (I guess I just assumed that any ".config" settings like that were built into the EXE as the ".manifest" file is now).

Once I copied the application.exe.config file into the program folder, the preview worked perfectly. Now if we can get it so I can have "C:\Temp" folder on my developement machine again, I'll be set!

Thanks again for all your help and suggestions!

- Richard

Answers (0)