[英]Is it possible to publish an unpackaged Windows App SDK (WinUI 3) as self contained single file?
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.我很确定我根据 Microsoft Docs 设置了所有正确的标志和所有内容,但是 UI dll 不包含在单个文件 exe 中。
AFAIK, you can't. AFAIK,你不能。 Self-Contained does not mean One-Single-File .自包含并不意味着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.这意味着所有依赖项都将在您的 EXE 旁边,因此您无需将运行时安装到目标设备。
Try using https://github.com/Fody/Costura/尝试使用https://github.com/Fody/Costura/
It's great for legacy .NET projects.它非常适合传统的 .NET 项目。 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.注意:这需要 Windows App SDK 1.1.0 或更高版本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.