[英]WPF, how to release just the .exe without xml files
When I release my application, I get a lot of XML files (ie Prism.wpf.xml, Prism.xml, system.runtime.compilerservices.unsafe.xml, projectname.exe.config) together with the actual.exe file.
最初,我安装 Costura 以在 .exe 文件中嵌入 .dll 文件。 这就像一个魅力。
因此,我的问题是,如何嵌入这些.xml 依赖项?
如评论中所述,可以安全地删除 XML 文件。
如果您只想部署包含所有依赖项的单个可执行 ( .exe
) 文件,则应考虑以 .NET Core 3 为目标并使用PublishSingleFile
选项发布您的应用程序:
dotnet publish -r win10-x86 -c release /p:PublishSingleFile=true
请参阅此博客文章了解更多信息。
没有官方支持的方法可以使用 .NET 框架创建单文件 WPF .exe
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.