GaryRasmussen
asked on
Error reqistering dll on 64bit server.
I wrote a .NET assembly that references the CrystalDecisions.CrystalRe ports.Engi ne.dll and the CrystalDecisions.Shared.dl l. 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.CrystalRe ports.Engi ne.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.Insta ll;
namespace FileConverter
{
[RunInstaller(true)]
public partial class RegisterDll : Installer
{
public RegisterDll()
{
InitializeComponent();
}
[System.Security.Permissio ns.Securit yPermissio n(System.S ecurity.Pe rmissions. SecurityAc tion.Deman d)]
public override void Commit(System.Collections. IDictionar y savedState)
{
base.Commit(savedState);
// Get the location of regasm
string regasmPath = System.Runtime.InteropServ ices.Runti meEnvironm ent.GetRun timeDirect ory() + @"regasm.exe";
// Get the location of our DLL
string componentPath = typeof(RegisterDll).Assemb ly.Locatio n;
// Execute regasm
System.Diagnostics.Process .Start(reg asmPath, "/codebase \"" + componentPath + "\"");
}
[System.Security.Permissio ns.Securit yPermissio n(System.S ecurity.Pe rmissions. SecurityAc tion.Deman d)]
public override void Install(System.Collections .IDictiona ry stateSaver)
{
base.Install(stateSaver);
}
}
}
========================== ========== ========== ========== ========== ========
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.CrystalRe
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.Insta
namespace FileConverter
{
[RunInstaller(true)]
public partial class RegisterDll : Installer
{
public RegisterDll()
{
InitializeComponent();
}
[System.Security.Permissio
public override void Commit(System.Collections.
{
base.Commit(savedState);
// Get the location of regasm
string regasmPath = System.Runtime.InteropServ
// Get the location of our DLL
string componentPath = typeof(RegisterDll).Assemb
// Execute regasm
System.Diagnostics.Process
}
[System.Security.Permissio
public override void Install(System.Collections
{
base.Install(stateSaver);
}
}
}
==========================
ASKER
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!
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!
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
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
ASKER
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.
ASKER
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!
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!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.