0

I've built a Windows service with VS 2008 with adding an installation project. The VS and and the entire development is an a Win 2003 server so when I install the service but r-clicking the installation project and selecting Install - it insalls fine.

Now it's time to move the service on the test server, same hardware/OS. I've copied the Release forlder and ran the service executable which resulted in nothing happening but a entry in the event log: "EventType clr20r3, P1 uploaderservice.exe, P2 1.0.0.0, P3 4e6e3f3e, P4 uploaderservice, P5 1.0.0.0, P6 4e6e3f3e, P7 4, P8 7, P9 system.typeinitialization, P10 NIL."

This appears to be a generig error and googling didn't return anything to go on.

Any ideas how to deploy/install this sort of things?

Thanks, Risho

Risho
  • 2,561
  • 5
  • 31
  • 56

1 Answers1

1

If you have a VS installation project, you should copy the *.msi file to the server you want to install the service on.

If you don't have an installation project that generates an installer package, create one. Here is an MSDN tutorial of how to do it: http://msdn.microsoft.com/en-us/library/19x10e5c.aspx

Maxim V. Pavlov
  • 10,303
  • 17
  • 74
  • 174
  • 1
    I think the _install_ option the OP is talking about in development is that of the installer _class_ for the service as part of the project; not that they already have a complete installation which executes the actions of said installer class. So, I think this suggestion is correct but also might elaborate to state the OP ought to have one if not already. – Grant Thomas Sep 13 '11 at 18:02
  • Yes, but without an installer there is no point considering moving to a test server. You would still need to manually register the system service, even if you have copied the binaries. – Maxim V. Pavlov Sep 13 '11 at 18:06
  • Indeed, but since I think you and the OP are referring to different installers (they are invoking registration from VS and you are talking of MSI) then to save confusion I was suggesting you make the suggestion of having an MSI to make life easier for everyone. – Grant Thomas Sep 13 '11 at 18:11
  • I did follow a tutorial on adding an installation project but it did not create a msi file. Instead the tutorial instructed to r-click on the project itself and select Install. As an alterative, I added a new set-up project which did create the msi file. I then copied it to the server and ran it. Wizard executed fine but no service showed up in the services gallery. – Risho Sep 13 '11 at 18:30
  • @Risho - do you run InstallUtil (or managed service registration aproach) from within the installer class to register the service? – Maxim V. Pavlov Sep 13 '11 at 18:33
  • @Maxim - I've tried InstallUtil, which at least causes my service to be displayed on the service gallery, but it will not start. This is the closest I've gotten and that is the error it writes into the log file. – Risho Sep 13 '11 at 18:36
  • @Riso - if the service is registered in the services snap-in, then it is installed on the system. If the problem that you are having appears when you try to start the service - you should try to do a remote debugging to see what the problem is. – Maxim V. Pavlov Sep 13 '11 at 18:45
  • @Maxim, I noticed that InstallUtil resides in the v2.0xxxx folder, however my service is built with 3.5 framework, but there is no IntallUtil in the v3.5 folder - could that be an issue? – Risho Sep 13 '11 at 18:48
  • @Riso - it should not be, since InstallUtill is registered as a PATH variable as far as I am concerned. Remote debugging isn't that hard, if your machine and the problem server are on the same domain. – Maxim V. Pavlov Sep 13 '11 at 18:51