I suggest you ...

Allow me to run windows service projects (and stop/start) from Visual Studio

I work with windows services all day. I compile but compilation fails because my windows service is running. I jump to Services.msc and then stop the service. Then I compile again, then wait for it to finish, then jump back to services.msc and start the service. If i try to Run the project through VS, it says you can't do it. I'd like to manage this lifecycle all within visual studio. Allow me to know if a service is running or not and allow me to stop and start it. Also, allow me to Run and windows service project.

15 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Mark OueisMark Oueis shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    4 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • radioman.ltradioman.lt commented  ·   ·  Flag as inappropriate

        just add #if DEBUG .. #endif and launch program as usual program, not service

      • tftf commented  ·   ·  Flag as inappropriate

        It would be nice if the Run Command in VS would:
        - Compile the service
        - Install the service
        - Start the service
        - Attach to the service

        And the stop command:
        - Detach from the service
        - stop the service
        - uninstall the service

        This way we can debug services in the same way as any other program.

      • AnonymousAnonymous commented  ·   ·  Flag as inappropriate

        I agree, but as a workaround, you can probably put in a pre-compile step to uninstall the service, and a post-compile step to reinstall the service.

      Feedback and Knowledge Base