Groups | Blog | Home
all groups > dotnet setup > april 2004 >

dotnet setup : Windows Service Install Project


Euan Grant
4/27/2004 9:46:08 PM
I am trying to setup a single setup project in VS.NET 2003 to deploy two windows services, an application, and the common libraries required by both

I want to install the services in two sub-directories under the user directory, and the main application in the user directory. I want to common libraries to be installed into the global assembly cache (done via the Global Assembly Cache Folder in the setup project)

I am calling the ProjectInstaller classes via custom actions in the setup project

I am getting the following error when running the msi file

"Unable to get installer types in the <windows service executable> assembly. -> One or more of the types in the assembly unable to load.

What is happening? How can I get the installer to recognise that it has just placed the assemblies with the required types in the GAC? Do these not becom available until the install has committed? Any help is greatly appreciated


Phil Wilson
4/28/2004 12:19:33 PM
Unfortunately it *hasn't* just placed the assemblies in the GAC. Assemblies
aren't actually in the GAC until much later in the install than other files
are on disk. If you look at the last paragraph of the documentation for the
MsiAssembly table it describes the problem.
--
Phil Wilson [MVP Windows Installer]
----
[quoted text, click to view]
directory, and the main application in the user directory. I want to common
libraries to be installed into the global assembly cache (done via the
Global Assembly Cache Folder in the setup project).
[quoted text, click to view]
just placed the assemblies with the required types in the GAC? Do these not
becom available until the install has committed? Any help is greatly
appreciated.
[quoted text, click to view]

Euan Grant
4/28/2004 5:46:02 PM
Is it possible to set this sort of behaviour for custom actions using the Visual Studio Setup project

Not being experienced using orca, I am hesitant to make changes if it will break my system when I go to install

Is there any reason behind this design? For windows service deployment using the VS setup projects, I would have thought that most people would install their shared libraries in the GAC, and as part of the installation of their services, need to refer to them.

----- Phil Wilson wrote: ----

Unfortunately it *hasn't* just placed the assemblies in the GAC. Assemblie
aren't actually in the GAC until much later in the install than other file
are on disk. If you look at the last paragraph of the documentation for th
MsiAssembly table it describes the problem
--
Phil Wilson [MVP Windows Installer
---
"Euan Grant" <anonymous@discussions.microsoft.com> wrote in messag
news:A241A313-F477-4F5E-AAD2-608B86B9E477@microsoft.com..
[quoted text, click to view]
directory, and the main application in the user directory. I want to commo
libraries to be installed into the global assembly cache (done via th
Global Assembly Cache Folder in the setup project)
[quoted text, click to view]
just placed the assemblies with the required types in the GAC? Do these no
becom available until the install has committed? Any help is greatl
appreciated
Phil Wilson
4/29/2004 8:45:31 AM
I don't know why it's designed that way, but a lot of people have the same
problem as you, and unfortunately it means you can't use a VS setup project
that starts Services that have references to assemblies in the GAC. The
simplest detour for VS setups is to start the service in a Commit custom
action because VS has support for Commit custom actions and because
assemblies are in the GAC when they're called. This is not great because
there are situations in which Commit CAs aren't called (if rollback is
disabled, for example). If you can get your assembly out of the GAC, go for
it.
--
Phil Wilson
[MVP Windows Installer]
Shameless plug:
Definitive Guide to Windows Installer-
http://apress.com/book/bookDisplay.html?bID=280

[quoted text, click to view]
using the VS setup projects, I would have thought that most people would
install their shared libraries in the GAC, and as part of the installation
of their services, need to refer to them.
[quoted text, click to view]

AddThis Social Bookmark Button