question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Run without window on Windows

See original GitHub issue

Description

We have WPF application that we would like to port to MAUI. This application sometimes runs on the background via a command line argument. In this case we just don’t show any window with the WPF application. We tried to also enable this with the MAUI Windows application, but it seems that it always expects to open a window?

Is it possible to add an enhancement that enables us to run a .NET MAUI windows application without opening a window?

Public API Changes

In WPF we removed the StartupUri and implemented a custom OnStartup method to have the option to decide if we wanted to open a window in our startup or not. I’m not sure where this would fit in .NET MAUI?

Intended Use-Case

Running the application without any interface. This could sound strange because it somewhat defies the purpose of .NET MAUI, but is currently helps us in deploying some extra background tasks easy (via the task scheduler) at our customers sites without the need to create a service.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:18
  • Comments:9

github_iconTop GitHub Comments

13reactions
DavidOsipovcommented, Jul 28, 2022

I’m a product manager /owner at a B2B company and this issue is a huge blocker for us for utilizing .NET MAUI for Windows and MacOS, because our apps should be able to run in background without any windows (only tray)

6reactions
TehGMcommented, May 1, 2022

Agreed here. I want to use MAUI for one of my tools, but I want it to start as a tray application only, until tray menu choice is actually made. There’s no reason why this shouldn’t be supported.

Read more comments on GitHub >

github_iconTop Results From Across the Web

command line - How to call CMD without opening a window
Simply call quiet.exe "program command line" and it will run whatever it is hidden. Share.
Read more >
How to run a batch file without launching a "command ...
cmd file, then right-click on the shortcut, Properties, Shortcut tab, Run: Minimized. Then in scheduled tasks, use the shortcut instead of the ....
Read more >
8 ways to open the Run command window in Windows
The quickest way to access the Run command window is to use this keyboard shortcut: Windows + R. Simply hold down the Windows...
Read more >
How to run .BAT files invisibly, without displaying ...
Run Windows Batch files hidden or in minimized mode without displaying the Command Prompt window. Use Windows script or Nircmd to run batch ......
Read more >
How to Run Console Programs Without a Console Window
If you do not know what I am talking about: press Win+R, type “help” and press ENTER. A black console window will open,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found