I'm new to the extension pack and I'm using it to build a deploy task to install & start a service on the local machine. The service installs, and is set to 'automatic start' but the service is unable to start.
The error message I get is "Error 1053: The service did not respond to the start or control request in a timely fashion"
In the event logs I see "A timeout was reached (30000 milliseconds) while waiting for the MyService service to connect."
I see this behavior from the build task and if I open the services snap-in and click 'start'. The failure occurs under 1s - not the 3s described in the event log.
Here is the task defined in my .build file:
<Target Name="Install-Local-ServiceHost"> <ItemGroup> <ServiceFiles Include="$(SolutionDir)\src\runtimes\service\bin\$(configuration)\*.*" /> </ItemGroup> <Copy SourceFiles="@(ServiceFiles)" DestinationFolder="$(installDir)" /> <MSBuild.ExtensionPack.Computer.WindowsService TaskAction="Install" ServiceName="$(serviceName)" ServiceDisplayName="$(serviceName)" User="$(username)" Password="$(password)" ServicePath="$(installDir)\Service.exe"/> <MSBuild.ExtensionPack.Computer.WindowsService TaskAction="SetAutomatic" ServiceName="$(serviceName)"/> <MSBuild.ExtensionPack.Computer.WindowsService TaskAction="Start" ServiceName="$(serviceName)" /> </Target>
Here is how it gets called:
msbuild leaseup.build /t:Install-Local-ServiceHost /p:installDir="d:\projects\app\deployment\debug\service" /p:username=user /p:password=myPassword /p:ServiceName=MyService
I know my code isn't even getting executed, as the first thing my service does is set up logging, which doesn't happen when I attempt to start the service.
Ideally I would be able to create a single build task that works for both local & remote deployments, but I'd like to get local working first.
Any help would be appreciated,
TIA,
jason