gpt4 book ai didi

azure-devops - AzureDevOps 管道 - UWP - 错误 APPX0002 : Task 'GenerateAppInstallerFile' failed. 输入字符串的格式不正确

转载 作者:行者123 更新时间:2023-12-04 07:35:23 28 4
gpt4 key购买 nike

我有管道任务,其 YAML 如下所述:

steps:
- task: VSBuild@1
displayName: 'Build solution **\*.sln'
inputs:
msbuildArgs: '/p:AppxBundlePlatforms="$(buildPlatform)" /p:AppxPackageDir="$(appxPackageDir)" /p:AppxBundle=Always /p:UapAppxPackageBuildMode=SideLoadOnly /p:AppxPackageSigningEnabled=true /p:PackageCertificateThumbprint="$(signingCert.thumbprint)" /p:PackageCertificateKeyFile="$(mySecureFile.secureFilePath)" /p:PackageCertificatePassword="$(signingCert.password)" /p:GenerateAppInstallerFile=true /p:AppInstallerUri="$(AppInstallerUri)" /p:AppInstallerUpdateFrequency=1 /p:AppInstallerCheckForUpdateFrequency=OnApplicationRun'
platform: x64
configuration: '$(buildConfiguration)'
clean: true
restoreNugetPackages: true
msbuildArchitecture: x64
createLogFile: true
基本上,我在这里尝试创建 appbundle 并生成 appinstaller 文件,以便我可以使用链接分发应用程序,因为该应用程序是内部应用程序。
这一直工作到 5 月 14 日绝对没问题。但是,当我们再次运行管道时,它会给我们以下错误。我确信 AzureDevOps 构建肯定已经更新了代理中的某些内容。但无法弄清楚实际问题。
##[error]C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VisualStudio\v16.0\AppxPackage\Microsoft.AppXPackage.Targets(6361,5): Error APPX0002: Task 'GenerateAppInstallerFile' failed. Input string was not in a correct format.

C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VisualStudio\v16.0\AppxPackage\Microsoft.AppXPackage.Targets(6361,5): error APPX0002: Task 'GenerateAppInstallerFile' failed. Input string was not in a correct format. [D:\a\1\s\Inspection.Management.UWP\Inspection.Management.UWP.csproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VisualStudio\v16.0\AppxPackage\Microsoft.AppXPackage.Targets(6361,5): error APPX0002: [D:\a\1\s\Inspection.Management.UWP\Inspection.Management.UWP.csproj]
##[error]C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VisualStudio\v16.0\AppxPackage\Microsoft.AppXPackage.Targets(6361,5): Error MSB4018: The "GenerateAppInstallerFile" task failed unexpectedly.
System.FormatException: Input string was not in a correct format.
at System.Text.StringBuilder.FormatError()

at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
at System.String.Format(String format, Object[] args)
at Microsoft.Build.AppxPackage.AppxPackagingTaskHelper.LogError(String context, String fileName, Int32 lineNumber, Int32 columnNumber, String message, Tuple`2 callerInfo, Object[] messageArgs)
at Microsoft.Build.AppxPackage.AppxPackagingTaskHelper.LogError(String message, String callerMemberName, Int32 callerLineNumber, Object[] messageArgs)
at Microsoft.Build.AppxPackage.GenerateAppInstallerFile.ExecuteImplementation()
at Microsoft.Build.AppxPackage.AppxPackagingTaskHelper.Execute(String file)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.Build.AppxPackage.AppxPackagingTaskHelper.Execute(String file)
at Microsoft.Build.AppxPackage.AppxPackagingTaskBase.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
有没有人遇到过这个问题?

最佳答案

同样的问题在这里。
如果我们通过在 MSBuild 参数中将 GenerateAppInstallerFile 设置为 false 来禁用 GenerateAppInstallerFile,这将起作用,如下所示。/p:GenerateAppInstallerFile=False仅当我们需要将我们的应用程序发布到 Web 服务器时才需要这样做,然后我们需要告诉 MSBuild 生成一个版本化的 .appinstaller 文件。否则,就我而言,我不需要它,所以我只需将它设置为 false,管道现在就可以工作了。

关于azure-devops - AzureDevOps 管道 - UWP - 错误 APPX0002 : Task 'GenerateAppInstallerFile' failed. 输入字符串的格式不正确,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67775837/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com