没有开发人员模式/开发人员许可证,无法旁载Win10 UWP应用程序 [英] Cannot Sideload Win10 UWP Application Without Developer Mode/Developer License
问题描述
我正在开发要在多台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的文档: https://docs.microsoft.com/zh-CN/windows/application-management/sideload-apps-in-windows-10
Per Microsoft's documentation: https://docs.microsoft.com/en-us/windows/application-management/sideload-apps-in-windows-10
- 设置目标计算机的侧负荷
- 通过Visual Studio创建测试证书
- 将测试证书添加到Visual Studio中的Package应用程序清单中
- 在发行版中编译UWP应用程序
- 将测试证书手动安装到目标计算机的受信任根证书颁发机构文件夹
- 在目标计算机上运行Add-AppDevPackage脚本
- Set the Target machine for Sideload
- Created the test cert via Visual Studio
- Added the test cert to Package app manifest in Visual Studio
- Compiled the UWP app in Release
- Manually installed the Test Cert to the Target machine's Trusted Root Certification Authorities folder
- Ran the Add-AppDevPackage script on the Target machine
这没有帮助:
在没有开发人员模式的情况下安装开发的应用程序
我对在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脚本,但没有解释为什么开发者检查首先出现在其中:
< a href = https://stackoverflow.com/questions/38971791/uwps-add-devapppackage-powershell-script-checks-for-a-developer-licence-this?rq=1> 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应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!