0

I am using MSBuild task to start a windows service. I am using following code:

MSBuild.ExtensionPack.Computer.WindowsService TaskAction="Start" ServiceName="AppServices"  ContinueOnError='false'/>

If I start the service I am getting following error:

Start Service failed with return code '[7] ServiceRequestTimeout'

Is there any setting or option to tell MSBuild to start service after waiting for a minute or two. Or Is there any way to introduce delay before calling this task within MSBuild?

Thanks

SharpCoder
  • 18,279
  • 43
  • 153
  • 249

1 Answers1

0

I do not think there is a way to tell the actually WindowsService task to delay the command. You can try putting this before your call though though:

<MSBuild.ExtensionPack.Framework.Thread TaskAction="Sleep" Timeout="1000"/>

This will put the executing thread to sleep for the timeout specified (in milliseconds).

Tyson Moncrief
  • 526
  • 3
  • 10