如何将基于C#UWP的项目构建到一个.exe文件? [英] How to build c# UWP-based project to one .exe file?

查看:837
本文介绍了如何将基于C#UWP的项目构建到一个.exe文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只想在Windows 10的项目中使用通用Windows.我需要将所有UI& logic内容编译为一个exe文件(或dll).就像我可以使用通常的WPF应用程序一样. 但是构建结果包含许多.xbf文件和.net库.我已经尝试在项目的构建设置中设置使用.NET Native工具链编译"选项,但是结果仍然包含很多文件.

I want to use universal windows in my project for windows 10 only. I need to compile all my UI&logic stuff to one exe-file (or dll). Like I could do the same with usual WPF application. But results of build contains a lot of .xbf files and .net-libraries. I already tryed to set "Compile with .NET Native tool chain" options in project's build settings, but the results still contains a lot of files.

推荐答案

开发框架,没有exe文件之类的东西.

Within the uwp development framework, there's no such thing as an exe file.

MSDN :

应用程序使用.AppX打包格式打包和分发.

Apps are packaged and distributed using the .AppX packaging format.

所有UWP应用都作为AppX软件包分发.这提供了 值得信赖的安装机制,并确保您的应用程序可以 无缝部署和更新.

All UWP apps are distributed as an AppX package. This provides a trustworthy installation mechanism and ensures that your apps can be deployed and updated seamlessly.

与使用WinRT框架的Windows 8和Windows 8.1应用程序相同.

This is the same scenario as it was with Windows 8 and Windows 8.1 applications using the WinRT framework.

如果您只需要exe文件来安装应用程序而不需要通过商店,请查看UWP的侧载选项.

If you need an exe file just to install your app without going through the store, take a look at the sideloading option for UWP.

您可以找到有关创建软件包,遍历商店和侧面加载此处.

You can find more info about creating packages, going through the store and sideloading here.

这篇关于如何将基于C#UWP的项目构建到一个.exe文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆