Skip to content

Add windows service deployment support #347

@danielmarbach

Description

@danielmarbach

Describe the suggested improvement

Is your improvement related to a problem? Please describe.

As part of #343 we have added Windows Service support but are currently not bundling a deployment that ships a Windows assembly to actually install the service. People using the Windows deployment option currently have to build and install it from sources.

Describe the suggested solution

See above

Describe alternatives you've considered

Build from Sources
  • Clone the repository, build in release mode

Note

Depending on disk location, some Acceptance Test projects may not build correctly due to path length limitations. Exclude the test projects from the build

  • install the service using sc.exe create (needs to be run as Administrator, and commandline parameters need any quotation marks escaped), e.g.
sc.exe create "ServiceControl MTConnector Service" binpath= "C:\Projects\ServiceControl.Connector.MassTransit\src\ServiceControl.Connector.MassTransit.Host\bin\Release\net8.0\ServiceControl.Connector.MassTransit.Host.exe --transport-type=RabbitMQ  --rabbitmq-management-api-url=""http://localhost:17672/"" --connection-string=""host=localhost:7672;username=guest;password=guest"""
  • start the service

publishing the build doesn't work, since the solution currently relies on Assembly.Location which returns empty string when published.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions