2016-08-17 183 views
0

我有桌面应用程序,并希望将其转换为uwp应用程序。 我使用桌面应用程序转换器与PowerShell。 我想我的启动项目exe文件进行转换,但每次我尝试停止执行桌面应用程序使用桌面应用程序转换器的UWP

Running Installer in Isolated Environment

VERBOSE: No installer valid exit codes specified. Using defaults: 0 VERBOSE: Replace any occurence of in -InstallerArguments with C:\installer\logs VERBOSE: Running installer command in isolated environment: VERBOSE: Command Line = "C:\installer\X.Framework.Main.exe" /passive

一部分。是我试图转换的exe是错误的或-InstallerArgument我写?我应该改变什么才能成功完成转换?

我的PowerShell命令:

PS C:\Users\EccE\Desktop\convert> .\DesktopAppConverter.ps1 -Installer C:\Users\EccE\Desktop\X\X-wpf-framework\bin\Debug\X.Framework.Main.exe -InstallerArguments "/passive" -Destination C:\Users\EccE\Desktop\X\X-out\ -PackageName "XApp" -Publisher "CN=X" -Version 0.0.0.1 -MakeAppx -Verbose

编辑:

,当我试图转换项目的解决方案,我得到了以下错误:

Running Installer in Isolated Environment

VERBOSE: No installer valid exit codes specified. Using defaults: 0 VERBOSE: Replace any occurence of in -InstallerArguments with C:\installer\logs VERBOSE: Running installer command in isolated environment: VERBOSE: Command Line = "C:\installer\X.Framework.sln" /passive VERBOSE: Moving any logs in C:\DesktopAppConverter\e931cac0-58a1-46dc-9efd-f5f442a0d814\shared\logs to C:\DesktopAppConverter\e931cac0-58a1-46dc-9efd-f5f442a0d814\logs VERBOSE: Cleaning up by removing isolated environment shared folder 'C:\DesktopAppConverter\e931cac0-58a1-46dc-9efd-f5f442a0d814\shared' VERBOSE: An error occurred. Refer to logs in C:\DesktopAppConverter\e931cac0-58a1-46dc-9efd-f5f442a0d814\logs Exception calling "RunIsolatedProcessWithMappedDirectoryAndExport" with "6" argument(s): " geçerli bir Win32 uygulaması değil. (HRESULT özel durum döndürdü: 0x800700C1)" At C:\Users\EccE\Desktop\convert\converter_util\Sequencer.ps1:141 char:9 + $installerExitCode = [Microsoft.Centennial.Tools.DesktopAppCo ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : BadImageFormatException

回答

0

VERBOSE: No installer valid exit codes specified

这是因为我们需要首先将我们的可执行程序打包成安装程序,该转换器可以通过转换器以无人值守(无提示)模式运行桌面安装程序,并获取可在开发计算机上使用Add-AppxPackage PowerShell cmdlet进行安装的AppX软件包。

请参见本文档中的第一段:Desktop App Converter Preview (Project Centennial)

又见Preparing your desktop app for conversion to UWP

您的应用程序的安装需要用户交互点。您的应用安装程序必须能够以无提示方式运行,并且它必须安装的所有先决条件,这些默认情况下不会在干净的OS映像上启用。

您可以创建一个MSI程序包并使用转换器根据需要生成Appx。