Royi Namir
Royi Namir

Reputation: 148524

Impossible to create windows service via DLL?

Ive written a windows service in DLL project. ( c#)

everything is fine with code and also InstallUtil is fine :

enter image description here

How every when I start it - via services.msc - it tells me

enter image description here

why is that ? Must I use EXE file (EXE project)?

I dont need the benefits of the exe file.

I just need to activate my dll as service

possible ?

Upvotes: 0

Views: 1445

Answers (1)

Richard
Richard

Reputation: 108995

Must I use EXE file (EXE project)?

Yes. Every Windows process starts by loading an exe, then its dependencies and then executing the entry point of the exe.

If you have a suitable entry point in your dll (essentially a Main) then a simple exe that just calls that entry point would be sufficient.

Upvotes: 4

Related Questions