Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

编译打包 #1

Closed
xhlove opened this issue Apr 10, 2021 · 2 comments
Closed

编译打包 #1

xhlove opened this issue Apr 10, 2021 · 2 comments

Comments

@xhlove
Copy link

xhlove commented Apr 10, 2021

感谢博主的代码,最近WinUI 3发布了一个新版,结合你的文章和官方文档,测试demo顺利跑起来了(直接执行不调试)。

博主的代码也可以正常运行,但是我尝试生成解决方案和生成对应的项目(生成没有报错),在对应的bin目录下,可以看到生成的exe,但是问题是这个exe无法运行。

然后了解了一番,看起来是要打包为msix这种(?),不知道博主是否可以介绍如何打包,以便可以将自己的程序分发给其他人使用?

如果需要打包为点击即可运行的exe,可否推荐一些文章或者视频教程,应该学习了解一些什么呢?

@xhlove
Copy link
Author

xhlove commented Apr 12, 2021

突然发现打包后的Package版本,出现在菜单栏...好像不能直接打包为免安装版本的,不过很奇怪的是运行编译的exe时没有提示,直接就安装上了。自己再研究研究了
image
image

@xhlove xhlove closed this as completed Apr 12, 2021
@DinoChan
Copy link
Owner

这是目前的限制“桌面应用支持 .NET 5 和 C# 9,而且必须在 MSIX 应用中打包”
https://docs.microsoft.com/zh-cn/windows/apps/winui/winui3/

然后这是路线图
https://github.com/microsoft/microsoft-ui-xaml/blob/master/docs/roadmap.md#winui-30-feature-roadmap

里面提到“Supports non-MSIX deployment”

解释在这里:microsoft/microsoft-ui-xaml#1045
Let me explain what "supports non-MSIX deployment" means. Today you need to install and run a Desktop WinUI 3 app using MSIX. This capability is about removing this need. To run a Desktop WinUI 3 app, you only need to double on a .EXE, and that's it. To install your app, you can just do an xcopy (no need to sign anything).

大致这样,我也没太关心过exe的问题,可能等等就自己解决了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants