Installing a VS2008 service using installutil.exe not working?

I built a Windows service to host my WCF service today, then added an installer class, with the view I could use installutil.exe to install it. I got the following error

C:\Documents and Settings\Administrator>installutil.exe C:\Documents and Setting
s\Administrator\Desktop\ORS2\Copy of API\WindowsHostService\bin\Debug\WindowsHos
tService.exe
Microsoft (R) .NET Framework Installation utility Version 1.1.4322.573
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.

Exception occurred while initializing the installation:
System.IO.FileNotFoundException: File or assembly name Documents, or one of its
dependencies, was not found..

The key to the problem is that my Environment Path variable is set to point at .Net framework 1 right through to 3.5, and it appears to default to applications in version 1. I just ran this in the end

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>InstallUtil.exe “C:\Documents and
Settings\Administrator\Desktop\ORS2\API\WindowsHostService\bin\Debug\WindowsHost
Service.exe”

And it worked fine using the ver 2.0 installer.

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Technorati
  • Twitter
Posted Friday, July 18th, 2008 under Development.

2 comments

  1. I think you actually had two problems. The other problem is that your first command line does not have quotes around your path to escape the spaces, which is why the error message stated that it could not find C:\Documents.

  2. Well spotted, I think I tried to replicate the problem to get the code for my blog post, but did a bad job of it and introduced a new error (the spaces in my command).

    You’re right though, the example I pasted had the wrong error :)

Leave a Reply

Get Adobe Flash playerPlugin by wpburn.com wordpress themes