我有一个uwp-app,使用Visual Studio 2015设计用于Windows 10(多点触控等),但它不能通过Windows应用商店发布(是的,它还包括那种'私有/隐藏'版本通过Windows商店)和通过Powershell安装对于普通客户来说有点复杂,所以我更喜欢一些好的旧.exe文件。
是否有可能导出/释放程序而不是.app as .exe?
Thx任何支持:)
简短的回答是你不能。
正如this article所解释的那样:
要销售您的通用Windows平台(UWP)应用程序或将其分发给其他用户,您需要为其创建一个appxupload包。创建appxupload时,将生成另一个appx包用于测试和侧载。您可以通过将appx包侧载到设备来直接分发您的应用。
所以你只有三个选择:
您可以创建一个powershell脚本来尝试自动化该过程(我从未尝试过这个),或者您自己的应用程序在WPF中实现自动化,但除此之外,目前还没有其他官方选项可用。
可以使用名为Advanced Installer的工具执行此操作。脚步
1. Create a new Installer Project Professional.
2. Select the files and folder option under Resources on the left side menu panel.
3. Right click on Application Folder > Add Files. Add your certificate and appx file.
4. Scroll down to Custom Actions tab under Custom Behavior on the left side menu panel.
5. Under Custom Actions, add a powershell inline script.
6. Write commands for installing the certificate and the extension. In parameter, pass
the certificate and appx file added to resources. Powershell commands-
certutil -addstore "TrustedPublisher" "<path>\certificate.cer"
Add-AppxPackage <path_to_appx_package>\uwpapp.appx
7. Under Execution time select- "When the system is being modified"
8. Under Execution options, select- Run with Local System with full previleges.
9. Select Builds tab in Package Definition,
10. Under configuration, package type, select Single Exe Setup(With Resources).
11. Right click on DefaultBuild and select build.This will generate an EXE file.
它不是一个完美的解决方案,但你可以尝试这些。