Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run a WPF Application as a Windows Service

We are developing a Windows Presentation Foundation Application that we would like to be able run as a Windows Service.

Anyone done something like that?
Is it possible?

We don't need to interact with the Desktop or any GUI, it would just be nice to have one App that we can run with a GUI, from the Command Line (that works) or as a Service.

Looking forward to interesting input :-)

like image 469
Remy Avatar asked Sep 17 '10 15:09

Remy


People also ask

Can Windows service be created using WPF?

Now we have two app startup entries - one for WPF and one for Windows Service. We can configure the startup object in Visual Studio by right-clicking on your project and selecting Properties -> Application -> Startup object . Setting the entry and rebuilding will get you what you want.

Is WPF still relevant 2021?

WPF is still one of the most used app frameworks in use on Windows (right behind WinForms).

Is WPF abandoned?

It was in 2006 that Windows Presentation Foundation (WPF) was released with . NET framework 3.0. Over the years it got improved and it is still now in the market in 2021.

Can WPF application run in browser?

WPF Browser applications (or XAML Browser applications, or XBAP) are a specific kind of application that are compiled into . xbap extensions and can be run in Internet Explorer.


1 Answers

We actually worked it out and wrote a little post about it:
http://remy.supertext.ch/2011/11/a-wpf-project-running-from-the-cmd-prompt-or-as-a-service-and-has-a-gui/

Maybe it helps someone.

like image 62
Remy Avatar answered Sep 21 '22 13:09

Remy