I am having some trouble with a windows service I am trying to install. It
builds just fine, but when I try to install it using an MSI created from a
..NET setup project, I get this error:
Exception occurred while initializing the installation:
System.IO.FileNotFoundException: File or assembly name savetrains.exe, or
one of its dependencies, was not found..
(savetrains.exe is the executable for my service)
If I install it from the command line, using installutil.exe, it installs
fine.
I did see this exact error when I had the path to the exe wrong (I had
mistyped it) on the command line. So it may be that the setup project is
trying to install if from the wrong place? Is there any way to determine the
path it is trying to install the service from? I would have assumed that it
would install it from the TARGETDIR property defined in the setup project,
but I know how dangerous it can be to assume things... Incidently, if I
check the path that it's installing to in windows explorer before I click
"OK" on the error message, all the files needed for the exe are there. So, I
copied the files from the installation folder to another directory, and ran
the installutil against them. It installed just fine. So there must be kind
of disconnect between where I'm putting the file and the installer is trying
to install from.
Any help would be greatly appreciated!
Theresa Smallwood