Reputation: 2971
So I have researched through MSDN and SO, but have not found the answer to a question asked quite this way: I have an app that will be turned off/on, and as part of the install/update, I want to have a Windows service get updated as needed also as part of the install to the primary app. The Windows service will provide data to the app, but if the app changes, the service may need to provide more/different data.
I looked at TopShelf as someone suggested on a different post, and seeing that makes me wonder if I can use TopShelf to deploy the service at the same time as the app itself - in other words, wrap the whole thing in ClickOnce, let TopShelf do the Windows Service part, and ClickOnce finish by doing the app part. Does that sound like a decent strategy?
Upvotes: 0
Views: 2389
Reputation: 2971
Ok, so I found my answer: ClickOnce doesn't do what I want, because Microsoft said so (under "Next Steps"). But their suggestion is to include a class called ServiceController which can talk to your service from your application, and do any Service manipulation that you want. (TopShelf doesn't appear to be necessary.) I like this because it allows everything to be under one roof, and is elegant...It should solve permissions issues and other barriers to simplicity of installation - we want this to be as easy and seamless for our customer as possible.
Upvotes: 1