Click here to Skip to main content
15,888,286 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi  
I want to run my window service in linux.
I don't know how to do that
can anyone please explain step by step to run my window service to run on linux
 
Thank you


What I have tried:

I have tried installing mono and then run

but no response (no error / no success)
Posted
Updated 25-Nov-20 6:41am

1 solution

You cannot just write up, say, a .NET 4.7.2 windows service app and expect it to work on Linux.

You'd have to write it up as a .NET Core 3 Worker Service app. See this[^] for an example.
 
Share this answer
 
Comments
ss2918singh 28-Nov-20 7:23am    
I have Running Window service build in VisualStudio 2013, i what to run this service in linux

how it will work?
Dave Kreskowiak 28-Nov-20 14:14pm    
It won't. The IDE you used to write the app has nothing to do with it working on any platform at all.

It ahs to do with the framework you wrote the app against. If you wrote it against .NET Framework, it won't work on Linux.

As I've already said, it has to be written against the .NET Core framework. Core is cross-platform. The straight .NET Framework is not.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900