Add-appxPackage部署失败:找不到文件

时间:2016-06-25 22:29:45

标签: powershell windows-10-universal

我正在尝试将我创建的Windows 10应用程序部署到笔记本电脑上。在我的计算机中,一切都很顺利,但是在笔记本电脑中,Add-appPackage首先识别相关的包文件,但是当在脚本中运行使得unbundle的行失败并返回时: '系统找不到指定的文件'尽管存在文件。 我尝试使用工作解决方案目录中的-register标志进行部署,但结果是相同的。 我在我的电脑中使用Windows 10 HOME而笔记本电脑是Windows 10 Pro,但我认为没关系。

visual studio packager生成的脚本文件中失败的行是:

Add-AppxPackage -Path $DeveloperPackagePath.FullName -DependencyPath $DependencyPackages.FullName -ForceApplicationShutdown

我检查了变量 - 它们包含正确的数据。 然后它输出错误行:

    $Error[0] # Dump details about the last error

没有给出关于哪个文件丢失的详细信息,如完整输出中所示:

C:\users\User\AlephBet_1.0.4.0_Test\Dependencies\x86\Microsoft.NET.Native.Framework.1.3.appx
C:\users\User\AlephBet_1.0.4.0_Test\Dependencies\x86\Microsoft.NET.Native.Runtime.1.3.appx
C:\users\User\AlephBet_1.0.4.0_Test\Dependencies\x86\Microsoft.VCLibs.x86.14.00.appx
C:\users\User\AlephBet_1.0.4.0_Test\Dependencies\x64\Microsoft.NET.Native.Framework.1.3.appx
C:\users\User\AlephBet_1.0.4.0_Test\Dependencies\x64\Microsoft.NET.Native.Runtime.1.3.appx
C:\users\User\AlephBet_1.0.4.0_Test\Dependencies\x64\Microsoft.VCLibs.x64.14.00.appx
Add-AppxPackage : The system cannot find the file specified.
The system cannot find the file specified.


At C:\users\User\AlephBet_1.0.4.0_Test\Add-AppDevPackage.ps1:388 char:13
+             Add-AppxPackage -Path $DeveloperPackagePath.FullName -Dep ...
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Add-AppxPackage],     FileNotFoundException
    + FullyQualifiedErrorId :     System.IO.FileNotFoundException,Microsoft.Windows.Appx.PackageManager.Commands.A    ddAppx 
   PackageCommand

我还尝试使用get-AppxLog获取信息,但它确实记录了错误。

  1. 会发生什么?缺什么?有没有办法获得有关错误的更多信息?
  2. Windows 10将appx放在哪里?有没有办法绕过并从现有的可执行版本中获取文件,比如.exe文件并将它们原样复制到笔记本电脑中?

0 个答案:

没有答案