简体   繁体   English

如何使用UWP / Window窗体/ WPF创建独立的exe(无任何依赖项),而无需运行.net框架就可以运行它?

[英]how to create standalone exe(without any dependencies) using UWP / Window forms / WPF that could run without .net framework?

by using .net native (UWP application) i am able to build an app that could run without .net framework being installed but problem arises as it creates many dependencies(dll files) along with the app. 通过使用.net native(UWP应用程序),我能够构建一个无需安装.net框架即可运行的应用程序,但是由于它与该应用程序一起创建了许多依赖项(dll文件),因此出现了问题。 i want to create a standalone application that could download a file(other exe) from web and execute it silently. 我想创建一个独立的应用程序,可以从Web下载文件(其他exe)并以静默方式执行它。

In .NET Core 3, which is currently in preview, you can publish single-file executables using dotnet and the PublishSingleFile property: 在当前处于预览状态的.NET Core 3中,您可以使用dotnetPublishSingleFile属性发布单文件可执行文件:

dotnet publish -r win10-x64 /p:PublishSingleFile=true

Please refer to this blog post for more information. 请参阅博客文章以获取更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM