I'm pretty sure I have all the right flags and everything set according to Microsoft Docs, however the UI dlls are not being included in the single file exe.
AFAIK, you can't. Self-Contained does not mean One-Single-File . It means that all the dependencies will be next to your EXE so you won't need to install runtimes to the target device.
Try using https://github.com/Fody/Costura/
It's great for legacy .NET projects. Newer frameworks have single-file executables as shown in their documentation
Yes - with this (unpackaged / self-contained) command line:
dotnet publish -f net6.0-windows10.0.19041.0 -c Release -p:WindowsPackageType=None -p:SelfContained=true -p:WindowsAppSDKSelfContained=true
Note: This requires Windows App SDK 1.1.0 or above.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.