Add a section about publishing standalone windows app
- Dominant language
- No language data
- Stars
- 282
- Forks
- 265
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 19
Description
Based on the discussion at https://github.com/dotnet/maui/issues/4329#issue-1115167089, there should be a section about publishing a standalone window application (without installer).
Even though the author said that option 3 somewhat works, it seems that it works pretty nicely.
This is the command that worked for me:
```
dotnet publish -f net6.0-windows10.0.19041.0 -c Release -p:WindowsAppSDKSelfContained=true -p:Platform=x64 -p:PublishSingleFile=True
```
The publish folder doesn't work, but the artifact folder's executable (``bin/x64/Release/net6.0-windows10.0.19041.0``) works; I didn't have any issues with functionality (i.e. moving, resizing, UI interaction, UI's events/commands). However, the output size is ridiculously large (about 200MB+ for a simple GUI) so there's probably little to no trimming.
One thing to note is that copying the bin folder elsewhere and attempting to run might trigger a virus scan, most likely because the binary isn't signed.
---
#### Document Details
⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*
* ID: 46808586-50e1-acfa-68b3-c3ca6572dc62
* Version Independent ID: 46808586-50e1-acfa-68b3-c3ca6572dc62
* Content: [Publish a .NET MAUI app for Windows - .NET MAUI](https://docs.microsoft.com/en-us/dotnet/maui/windows/deployment/overview)
* Content Source: [docs/windows/deployment/overview.md](https://github.com/dotnet/docs-maui/blob/main/docs/windows/deployment/overview.md)
* Product: **dotnet-mobile**
* Technology: **dotnet-maui**
* GitHub Login: @davidbritch
* Microsoft Alias: **dabritch**
Contributor guide
Assessment
This issue has not been assessed yet.