Lu&#237&#59;s Miguel Silva

Hello everybody,

I've been developing a socket server as a console application (for testing purposes) but i now need to turn it into a Windows Service.

How can i do this with Visual C# 2005 Express Edition

I saw a tutorial but it wasn't for the express edition.

Thank you,
Luis Silva


Re: Visual C# Express Edition How to convert a console application service into a windows service?

ahmedilyas

I could be wrong but I don't think the express editions allows you to create a Windows Service - I think that is one of the limitations of the express editions.

Perhaps there are project templates available for download from MSDN Not entirely sure.

If you don't see a Windows Service project in the "New Project" dialog then I guess that is the limitation.






Re: Visual C# Express Edition How to convert a console application service into a windows service?

Luís Miguel Silva

But i actually can add a reference to System.ServiceProcess;

I just how can i do it without using a template.

Any thoughts Surprise)




Re: Visual C# Express Edition How to convert a console application service into a windows service?

ahmedilyas

sure, you can add a reference but that is different. That is part of the .NET Framework but the IDE is limited into what it can do, as its an express edition.

Try checking out to see if you can download the template within VS Express IDE (when you create a new project, I think there might be something there to "Get templates" )






Re: Visual C# Express Edition How to convert a console application service into a windows service?

Luís Miguel Silva

That was my first try actually ;o)

It simply took me to a page where it said "no templates available"...

My next try will be to install the Visual Studio 2005 Pro Trial!

Does anybody know if i can distribute / sell the software i compile with this version

Best,
Luis




Re: Visual C# Express Edition How to convert a console application service into a windows service?

ahmedilyas

yes of course you can, as long as you do not sell the trial version of VS 2005 or the Microsoft product itself.






Re: Visual C# Express Edition How to convert a console application service into a windows service?

Andreas Johansson

That there is no project template does not mean it is not possible. Windows services in .NET are created by creating a class that derives from ServiceBase. The MSDN entry for it has a complete source code example that you can check out and copy from to create your own service.

http://msdn2.microsoft.com/en-us/library/system.serviceprocess.servicebase.aspx

The code is .NET and 100% compatible with VC# express. The express editions just doesn't get shipped with a project template for it.






Re: Visual C# Express Edition How to convert a console application service into a windows service?

ahmedilyas

Thanks Andreas - good to know.