Using installer classes

G

Guest

How can I use installer classes in my application without getting the famous
"Unable to get installer types" error message durring the installation
process?
Thanks in advance.
 
L

Lloyd Dupont

The installer class is inside my main assembly.
Which, of course, is in the install package!
And I had no such problem.
In fact it worked well right at the 1st attempt (and ever since).
 
P

Phil Wilson

You should explain what you're doing to get that message. My guess is that
you have your Installer class in an assembly that has a dependency on some
other assembly that isn't available. One of the ways this can happen is that
a dependent assembly is being installed into the GAC, and unfortunately
assemblies aren't actually properly in the GAC until after custom actions
are called, so dependencies fail to load.
 
G

Guest

The installer classes are containd in the main assembly (the exe).
The only assembly that is located in the GAC it that of Crystal Reports, and
it should already be in the GAC (no?)
I also use some of the Microsoft Application Blocks (Enterprise Library) in
my application. Could that be the problem?

Phil Wilson said:
You should explain what you're doing to get that message. My guess is that
you have your Installer class in an assembly that has a dependency on some
other assembly that isn't available. One of the ways this can happen is that
a dependent assembly is being installed into the GAC, and unfortunately
assemblies aren't actually properly in the GAC until after custom actions
are called, so dependencies fail to load.
--
Phil Wilson
[Microsoft MVP-Windows Installer]
Definitive Guide to Windows Installer
http://apress.com/book/bookDisplay.html?bID=280

Amir Shitrit said:
How can I use installer classes in my application without getting the
famous
"Unable to get installer types" error message durring the installation
process?
Thanks in advance.
 
P

Phil Wilson

I don't believe that the Crystal reports assemblies are in the GAC on every
client system where you might be installing your app, so I don't know why
they should be in the GAC already. That depends on the target system.
Developer systems often have every known DLL and assembly already installed,
but that's not true of most client systems. Whether they're in the GAC
already depends on whether you need to distribute them via their merge
modules or whatever CR supply as redistributables. However it's not likely
to be CR because your Installer class code probably isn't referencing the CR
assemblies, so are you referencing application blocks in your custom
actions?

The two key things that you need to look at are:

1. What dependencies does your exe need in the Installer class code and are
they on the target system already or not? Are they included in the framework
redist? I don't know if application block assemblies are or not.
2. Even if you are installing your dependent assemblies, they aren't
present in the GAC until after custom actions are called.

--
Phil Wilson [MVP Windows Installer]
----
Amir Shitrit said:
The installer classes are containd in the main assembly (the exe).
The only assembly that is located in the GAC it that of Crystal Reports,
and
it should already be in the GAC (no?)
I also use some of the Microsoft Application Blocks (Enterprise Library)
in
my application. Could that be the problem?

Phil Wilson said:
You should explain what you're doing to get that message. My guess is
that
you have your Installer class in an assembly that has a dependency on
some
other assembly that isn't available. One of the ways this can happen is
that
a dependent assembly is being installed into the GAC, and unfortunately
assemblies aren't actually properly in the GAC until after custom actions
are called, so dependencies fail to load.
--
Phil Wilson
[Microsoft MVP-Windows Installer]
Definitive Guide to Windows Installer
http://apress.com/book/bookDisplay.html?bID=280

Amir Shitrit said:
How can I use installer classes in my application without getting the
famous
"Unable to get installer types" error message durring the installation
process?
Thanks in advance.
 
G

Guest

I don't reference any custom GAC assembly in my installer classes, however, I
do reference local copy assemblies.
Any way, none of my custom assembly is installed to the GAC (excluding CR).

Phil Wilson said:
I don't believe that the Crystal reports assemblies are in the GAC on every
client system where you might be installing your app, so I don't know why
they should be in the GAC already. That depends on the target system.
Developer systems often have every known DLL and assembly already installed,
but that's not true of most client systems. Whether they're in the GAC
already depends on whether you need to distribute them via their merge
modules or whatever CR supply as redistributables. However it's not likely
to be CR because your Installer class code probably isn't referencing the CR
assemblies, so are you referencing application blocks in your custom
actions?

The two key things that you need to look at are:

1. What dependencies does your exe need in the Installer class code and are
they on the target system already or not? Are they included in the framework
redist? I don't know if application block assemblies are or not.
2. Even if you are installing your dependent assemblies, they aren't
present in the GAC until after custom actions are called.

--
Phil Wilson [MVP Windows Installer]
----
Amir Shitrit said:
The installer classes are containd in the main assembly (the exe).
The only assembly that is located in the GAC it that of Crystal Reports,
and
it should already be in the GAC (no?)
I also use some of the Microsoft Application Blocks (Enterprise Library)
in
my application. Could that be the problem?

Phil Wilson said:
You should explain what you're doing to get that message. My guess is
that
you have your Installer class in an assembly that has a dependency on
some
other assembly that isn't available. One of the ways this can happen is
that
a dependent assembly is being installed into the GAC, and unfortunately
assemblies aren't actually properly in the GAC until after custom actions
are called, so dependencies fail to load.
--
Phil Wilson
[Microsoft MVP-Windows Installer]
Definitive Guide to Windows Installer
http://apress.com/book/bookDisplay.html?bID=280

How can I use installer classes in my application without getting the
famous
"Unable to get installer types" error message durring the installation
process?
Thanks in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top