A
Andrew Raastad
I have a Windows Service I created a while back for our Win2003/2008 32bit
Servers, written in Visual Studio 2008, deployed via a VS2k8 Setup Project.
Everything works great, installs fine, and runs as it should. There is no
platform dependent code, it's all straight-up .Net Framework stuff, so we
thought it should deploy to a Win2008 64bit Server just fine. But this
seems not to be the case.
When I try to install the Service as is on the 64bit machine, the service
and associated DLL's are installed to the "C:\Windows\SysWOW64" folder, but
when you right click the Service itself and look at the properties, it is
trying to find the .exe file in the "C:\Windows\System32" folder. This
difference prevents the service from running, obviously.
If I change the Setup Project settings, set the Target Platform to "x64" and
change in the File System screen to use the "System (64-bit) Folder" placing
the files in there and re-run the setup.exe on the server.... now the files
are correctly installed to the "C:\Windows\System32" folder, but the Service
itself is not 'installed', that is it *does not* show up in the Services
Manager.
Just for the giggles of it I tried to manually install the service using
'installutil.exe' in the .Net Framework folder, but it failed with the
following exception:
"Exception occurred while initializing the installation:
System.IO.FileNotFoundException:
Could not load file or assembly
'file:///C:\Windows\System32\NPInterfaceService.exe' or one of its
dependencies. The system can not find the file specified.."
But then I remembered there is a 64bit version of the .Net Framework, so I
ran the 'installutil.exe.' from the .Net Framework64 folder, which
successfully installed the Service.
When I set the Target Platform of the Setup Project for x64, shouldn't it
use the 64bit version of the framework to install the service? If not, what
does? The Setup Project should handle this automatically, not require manual
intervention. What's the deal? Help?
-- Andrew
Servers, written in Visual Studio 2008, deployed via a VS2k8 Setup Project.
Everything works great, installs fine, and runs as it should. There is no
platform dependent code, it's all straight-up .Net Framework stuff, so we
thought it should deploy to a Win2008 64bit Server just fine. But this
seems not to be the case.
When I try to install the Service as is on the 64bit machine, the service
and associated DLL's are installed to the "C:\Windows\SysWOW64" folder, but
when you right click the Service itself and look at the properties, it is
trying to find the .exe file in the "C:\Windows\System32" folder. This
difference prevents the service from running, obviously.
If I change the Setup Project settings, set the Target Platform to "x64" and
change in the File System screen to use the "System (64-bit) Folder" placing
the files in there and re-run the setup.exe on the server.... now the files
are correctly installed to the "C:\Windows\System32" folder, but the Service
itself is not 'installed', that is it *does not* show up in the Services
Manager.
Just for the giggles of it I tried to manually install the service using
'installutil.exe' in the .Net Framework folder, but it failed with the
following exception:
"Exception occurred while initializing the installation:
System.IO.FileNotFoundException:
Could not load file or assembly
'file:///C:\Windows\System32\NPInterfaceService.exe' or one of its
dependencies. The system can not find the file specified.."
But then I remembered there is a 64bit version of the .Net Framework, so I
ran the 'installutil.exe.' from the .Net Framework64 folder, which
successfully installed the Service.
When I set the Target Platform of the Setup Project for x64, shouldn't it
use the 64bit version of the framework to install the service? If not, what
does? The Setup Project should handle this automatically, not require manual
intervention. What's the deal? Help?
-- Andrew