PeterKottas / DotNetCore.WindowsService

Simple library that allows one to host dot net core application as windows services. Perfect solution to power micro-services architecture.
MIT License
568 stars 150 forks source link

Proper usage of command line arguments for installing and naming the service #97

Open jjwilliams42 opened 6 years ago

jjwilliams42 commented 6 years ago

Can you provide documentation for the proper usage of multiple command line arguments together?

We have an Octopus Deploy step to update our Windows Service, and are running this in our script:

./MyService.exe description:MyService$OctopusParameters["Octopus.Environment.Name"] display-name:MyService$OctopusParameters["Octopus.Environment.Name"] name:MyService$OctopusParameters["Octopus.Environment.Name"] action:install

This evaluates to: ./MyService.exe description:MyServiceBeta display-name:MyServiceBeta name:MyServiceBeta action:install

Yet the service is installed with the values I set in Program.Main() using the ServiceRunner<Service>(config => {}) apis (Name = "MY_SERVICE", Description = "My Service", Display Name = "My Service")

Which one should win? Can the command line not overwrite the values in the ServiceRunner?

PeterKottas commented 6 years ago

Yeah it seems the service runner overrides the cmd params. Logically it should be the other way around. I' ll fix this when we accumulate a few issues.