This project is read-only.

Service does not exist

Dec 22, 2010 at 8:26 PM
   I am trying to stop a service and i have this in my build.xml 
<MSBuild.ExtensionPack.Computer.WindowsService TaskAction="Stop" ServicePath="D:\_PublishedWebsites\Some Service.exe" />    
But i get 
error: Service does not exist: 

but the fact is that this file exist in the folder and the windiows service is running.I even tried using ServiceDisplayName and ServiceName instead of ServicePath but i still get the same error.
Dec 23, 2010 at 8:15 AM

The task requires ServiceName, e.g.

  <Target Name="Default">
    <MSBuild.ExtensionPack.Computer.WindowsService TaskAction="CheckExists" ServiceName="btwdins">
      <Output TaskParameter="Exists" PropertyName="DoesExist"/>
    <Message Text="Bluetooth Service service exists: $(DoesExist)"/>
    <MSBuild.ExtensionPack.Computer.WindowsService TaskAction="Stop" ServiceName="btwdins"/>
    <MSBuild.ExtensionPack.Computer.WindowsService TaskAction="Start" ServiceName="btwdins"/>