Noticed for the same Visual Studio Project you can go:
Add new item > Windows Form
also Add new item > Windows Service
Can a single project have both Forms and Services? Installation of the assembly was successfully, but didn't have luck running it. I really wonder why Microsoft made it possible to add Forms and Services to the same project.
What version of VS? That sounds really weird. I thought that a service was a project in itself, because it gets compile to a single EXE. How can you then add a service to another project?
jmcilhinney, that's great. I was just dumbfounded with no clue what we can achieve from that feature/capability in Visual Studio.
So many questions...
how could a Windows Service (*.exe) and a Windows Form (*.exe) compile to a single exe?
Does this mean we can have Windows Forms that can act like a Windows Service (if needed)??
If not why did Microsoft add this ability in the first place??? I am sure you share those questions (and may be more too).
It seems like Having Service and a Windows Forms GUI in the same EXE is possible! Hav a look at DynDNS Updater. They have implemented thsi sort of design. http://www.dyndns.com/support/clients/
I know a service is technically not supposed to have a user interface, correct? But...what if you happened to want to display a window when some event happens within the service. I think MSDE runs as a service but displays a tray icon to help manage itself. And the windows messenger service (the one for net send that everyone disables nowadays) displays a message box (not exactly a win form though). Point is, it's all just code so there's no reason to exclude certain code from an exe.
The human brain cannot hold all of the knowledge that exists in this world, but it can hold pointers to that knowledge.