Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Error reqistering dll on 64bit server.

Posted on 2011-03-14
6
Medium Priority
?
1,172 Views
Last Modified: 2012-06-21
I wrote a .NET assembly that references the CrystalDecisions.CrystalReports.Engine.dll and the CrystalDecisions.Shared.dll.  I created a installer project that uses Regasm to register the 2 Crystal Report dlls and my dll.  When I run the installer on my Windows 7 machine, it installs just fine.

When I try to install it on a 64 bit server, I get an error 1001.Unable to get installer types in the C:\Folder\ CrystalDecisions.CrystalReports.Engine.dll assembly.  Retrieve the LoadExceptions property for more information.
My project platform and platform target are both set to “Any CPU”.

Could this be because it is a 64 bit server and if so, what can I do about it?  How does one retrieve the LoadExceptions property?

This is the code that my installer is running to register the dlls.  I didn’t write it but it works on my Windows 7 machine.

==========================================================================
using System.ComponentModel;
using System.Configuration.Install;

namespace FileConverter
{
    [RunInstaller(true)]
    public partial class RegisterDll : Installer
    {
        public RegisterDll()
        {
            InitializeComponent();
        }

        [System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand)]
        public override void Commit(System.Collections.IDictionary savedState)
        {
            base.Commit(savedState);

            // Get the location of regasm
            string regasmPath = System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory() + @"regasm.exe";
            // Get the location of our DLL
            string componentPath = typeof(RegisterDll).Assembly.Location;
            // Execute regasm
            System.Diagnostics.Process.Start(regasmPath, "/codebase \"" + componentPath + "\"");
        }

        [System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand)]
        public override void Install(System.Collections.IDictionary stateSaver)
        {
            base.Install(stateSaver);
        }
    }
}
==========================================================================

0
Comment
Question by:GaryRasmussen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 23

Expert Comment

by:wdosanjos
ID: 35131302
I think the Crystal assemblies are 32-bit dll's.  Since, you built your code to "Any CPU" it will run as 64-bit process on a 64-bit machine, and it will choke when trying to load 32-bit dll's.

Try building your application to "x86", and check if the problem goes away.  Alternatively, you can try to confirm if that Crystal dll's support 64-bit.

I hope this helps.
0
 
LVL 1

Author Comment

by:GaryRasmussen
ID: 35131820
Thanks for the help.  I set the cpu type to x86 and rebuilt the project but the installer is still giving me the same error.

Are the Crystal dlls that come with VS2008 a MS product or a SAP product?  How can I find out if the Crystal dlls that come with VS2008 will work on a 64 bit OS?  Also, do I need to buy a license to include the Crystal dlls that come with VS2008 with my application?

Thanks!
0
 
LVL 23

Expert Comment

by:wdosanjos
ID: 35132332
I did further research on this issue.  Just installing the Crystal dll's is not enough.  You need to install the Runtime Packages for Crystal Reports Basic for Visual Studio .NET 2008, which can be found on the link below:

http://resources.businessobjects.com/support/additional_downloads/runtime.asp#09

Crystal is a SAP product.  Read the license agreement on the installer above for more information.

BTW, to determine if a dll is 32 or 64 bit. Open the VS command prompt, then execute the following command:

corflags "<complete path to assembly>"

Check the PE and 32BIT flags:

    AnyCpu: PE=PE32   32BIT=0
    x86:        PE=PE32   32BIT=1
    x64:        PE=PE32+ 32BIT=0

0
The Orion Papers

Are you interested in becoming an AWS Certified Solutions Architect?

Discover a new interactive way of training for the exam.

 
LVL 1

Author Comment

by:GaryRasmussen
ID: 35135154
Thank you again.  I will research these other dllls soon.  And I understand what you are saying, "Just installing the Crystal dll's is not enough." but that is something I will deal with later.  My problem is not running my program.  My problem is getting the Crystal dlls installed that my program is referencing.
0
 
LVL 1

Author Comment

by:GaryRasmussen
ID: 35135195
Also, on that page that the link took me to, it says ...

This file contains the latest install packages required for deploying .NET applications using Crystal Reports Basic for Visual Studio .NET 2008 runtime.

Am I really using Crystal Reports Basic  when I am referencing the Crystal Report dlls that come with VS 2008 out of the box?  I mean I can download the other dlls and incorporate them into my installer program but I just want to make sure these are not 2 different things.

Thanks again!
0
 
LVL 23

Accepted Solution

by:
wdosanjos earned 2000 total points
ID: 35142069
You need to execute the Crystal runtime install as part of your installer.  As I understand, the Crystal dll's require a runtime environment that need to be installed on the server also.  Just deploying the Crystal dll's referenced by your project is not enough.
0

Featured Post

Docker-Compose to Simplify Multi-Container Builds

Our veteran DevOps Author takes you through how to build a multi-container environment, managed with a single utility in order to simplify your deployments.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question