docs-maui
docs-maui copied to clipboard
CLI packaged app docs should encourage users to use "--self-contained" argument
Type of issue
Code doesn't work
Description
Using the current instructions, users who download a packaged app (even if it is from the store) will run into this issue: https://github.com/dotnet/maui/issues/19763
The documentation should encourage users to use "--self-contained" as part of the CLI command to ensures it works on non-developer PCs without requiring any additional dependencies.
Page URL
https://learn.microsoft.com/en-us/dotnet/maui/windows/deployment/publish-cli?view=net-maui-8.0
Content source URL
https://github.com/dotnet/docs-maui/blob/main/docs/windows/deployment/publish-cli.md
Document Version Independent Id
d0d904f8-2ff9-df92-6399-dc2ac35310b7
Article author
@davidbritch
Metadata
- ID: d0d904f8-2ff9-df92-6399-dc2ac35310b7
- Service: dotnet-mobile
- Sub-service: dotnet-maui
The unpackaged docs should encourage users to do this as well https://learn.microsoft.com/en-us/dotnet/maui/windows/deployment/publish-unpackaged-cli?view=net-maui-8.0
The unpackaged docs mentioned you should use -p:WindowsAppSDKSelfContained to include the ".NET runtime". But from what I've observed, neither packaged apps nor unpackaged apps contain the .NET runtime unless you use the --self-contained CLI flag. So I think the wording in a couple of places needs improved.
-p:WindowsAppSDKSelfContained=true doesn't appear to make any difference to the build. The "Microsoft.WindowsAppRuntime" dlls are there even if you omit that command. I expect that potentially MAUI is defaulting this to true since after the docs were written?