我正在开发要在多台PC上安装的业务线应用程序,但是我无法使Sideload成功完成。
I'm developing a Line of Business application to be installed on multiple PC's, but I cannot get the Sideload to finish successfully.
我从 Add-AppDevPackage 脚本收到以下错误:
I receive the following error from the Add-AppDevPackage script:
无法获得开发者许可证
"Could not acquire a developer license"
如果设置了开发者模式,问题消失了。但这不是应用程序软件部署的选项。
If I set Developer Mode, my problems go away. But... That is not an option for the app's software deployment.
我的设置:Visual Studio 2017,开发机上的Win10 v。1903,Win10 v。1809在目标计算机上
My setup: Visual Studio 2017, Win10 v. 1903 on the Development machine, Win10 v. 1809 on the Target machines
根据Microsoft的文档: docs.microsoft/zh-CN/windows/application-management/sideload-apps-in-windows-10
Per Microsoft's documentation: docs.microsoft/en-us/windows/application-management/sideload-apps-in-windows-10
这没有帮助: 在没有开发人员模式的情况下安装开发的应用程序
我对在Microsoft上安装软件没有兴趣此处概述的企业商店: 安装不带开发人员模式的UWP和
I have no interest in putting software on the Microsoft Store for Business as outlined here: Install UWP without developer-mode and sideloading
这说我还需要另一个应用程序??? (AppInstaller)使侧面加载工作:如何使用可以侧面加载的证书创建UWP应用
This says I need yet another app??? (AppInstaller) to make sideloading work: How to created a UWP app with a certificate that can be sideloaded
我可以修改Powershell脚本以消除开发人员许可检查,但似乎我不必强行加重负担。
I could modify the Powershell script to eliminate the Developer License check, but it seems like I shouldn't have to brute force the sideload.
这里的答案是破解我前面提到的Poweshell脚本,但没有解释为什么开发者检查首先出现在其中: UWP的 Add-DevAppPackage Powershell脚本检查开发者许可证。
The answer here is to hack the Poweshell script as I mentioned earlier, but does not explain why the Developer Check is out there in the first place: UWP's 'Add-DevAppPackage' Powershell script checks for a developer licence. This is an issue for Sideloading?
推荐答案不是必须这样做才能编写应为 turn key,但这允许在没有开发人员许可检查错误的情况下进行侧面加载,并且安装失败。
Not a fan of having to do this to code that should be "turn key", but this allows sideloading without the Developer License check error and install fail.
修改Add-AppDevPackage.ps1:
Modify Add-AppDevPackage.ps1:
# # Checks whether the machine is missing a valid developer license. # function CheckIfNeedDeveloperLicense { $Result = $true try { $Result = (Get-WindowsDeveloperLicense | Where-Object { $_.IsValid } | Measure-Object).Count -eq 0 } catch {} return $false #$Result }更多推荐
没有开发人员模式/开发人员许可证,无法旁载Win10 UWP应用程序
发布评论