我正在创建一个 Pipelines 以在 Android 应用程序上下载文件,一旦我使用 MSBuild 构建,它就会告诉我错误
error MSB4044: The "AndroidSignPackage" task was not given a value for the required parameter "KeyPass".
,因为我没有按照中的建议将 Keypass 的密码放入我的 csproj 中maui doc 那么我该如何在不明确的情况下给出密码呢?
YAML 中的 MSBuild
- task: MSBuild@1
displayName: 'Build'
inputs:
platform: '$(buildPlatform)'
solution: '$(solution)'
configuration: '$(buildConfiguration)'
msbuildArgs: '/p:AppxBundlePlatforms="$(buildPlatform)" /p:AppxPackageDir="$(appxPackageDir)" /p:AppxBundle=Never p:UapAppxPackageBuildMode=SideLoadOnly /p:AppxPackageSigningEnabled=true /p:PackageCertificateThumbprint="" /p:PackageCertificateKeyFile="$(signingCert.secureFilePath)"'
csproj
<PropertyGroup Condition="$(TargetFramework.Contains('-android')) and '$(Configuration)' == 'Release'">
<AndroidKeyStore>True</AndroidKeyStore>
<AndroidSigningKeyStore>myapp.keystore</AndroidSigningKeyStore>
<AndroidSigningKeyAlias>key</AndroidSigningKeyAlias>
<AndroidSigningKeyPass></AndroidSigningKeyPass>
<AndroidSigningStorePass></AndroidSigningStorePass>
</PropertyGroup>
我也有同样的问题。通过在“属性”->“Android”->“包签名”中填写 Allias 密码可以解决此问题。