dotnet / dotnet/maui

Run without window on Windows

Open
#3,846 14 comments 25 reactions 0 assignees View on GitHub
area-core-platform legacy-area-desktop platform/windows proposal/open t/desktop t/enhancement ☀️
Dominant language
C#
Stars
23.3k
Forks
2k
Avg merge
1d 14h
Merged PRs (30d)
296

Description

### 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.

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are identified. Start by tracing the MAUI Windows startup and window lifecycle; done means a Windows app can honor a command-line choice to run without opening a window while retaining normal windowed startup.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.