0

I'm trying to install a Windows service which I've built in Visual Studio. I'm publishing the service to a local folder and when I'm trying to do the setup I'm getting this error:

enter image description here

Then, I'm navigating to the VS2013 console, and I'm trying to run the InstallUtil command but this is the error I'm getting:

enter image description here

The app doesn't have any dependencies and its local solution. There are no DLLs included and this is the content of the output folders:

enter image description here

enter image description here

The application is built in vs2013, using .net framework 4.5. What am I missing?

halfer
  • 19,824
  • 17
  • 99
  • 186
Laziale
  • 7,965
  • 46
  • 146
  • 262
  • Have you added an installer in the service design surface? – Peter Ritchie Sep 26 '14 at 16:57
  • @PeterRitchie yes http://i.gyazo.com/b383ea9b26f872ddf76e921d135c2bab.png – Laziale Sep 26 '14 at 17:04
  • Your screen cap of your directory that shows SALEmailAlerts and the deploy/manifest files shows "ClickOnce Application" for SALEmailAlerts type. This means the extension is likely .application and not .exe. Which would mean the SALEmailAlerts.exe file does not exist and installutil is telling you the truth. – Peter Ritchie Sep 26 '14 at 17:10

1 Answers1

1

If you are creating a ClickOnce app, the build process creates a .application file which is a "manifest" of the files needed to install the application. double-clicking the .application file will install the application, including any .exe files.

But, you cannot deploy a Windows Service with ClickOnce. ClickOnce deployments executed in a much lower set of privileges than a classical install (Windows Installer). If you need to deploy a Windows Service you're going to have to use Windows Installer technology with the Windows Installer framework of your choice (e.g. WiX). See http://msdn.microsoft.com/en-us/library/ms973805.aspx for more details on what ClickOnce suports

Peter Ritchie
  • 35,463
  • 9
  • 80
  • 98
  • you were correct about this one, I navigated to the actual folder for the .exe within the vs folder and I was able to run installutil there. Thanks a lot for your help – Laziale Sep 26 '14 at 17:17