简体   繁体   中英

TFSBuild for Windows Store App Fails with error APPX0105: Cannot import the key file

I am using tfsbuild 2010 this arguements "/p:VisualStudioVersion=12.0;ToolPath="C:\\Program Files (x86)\\MSBuild\\12.0\\Bin"" to build windows store app. There is no issues in signing packages when using a test certificate with no password.

But it fails with below error for a certificate from third party with password.

C:\\Program Files (x86)\\MSBuild\\Microsoft\\VisualStudio\\v12.0\\AppxPackage\\Microsoft.AppXPackage.Targets(1781,9): error APPX0105: Cannot import the key file 'XXXX.pfx'. The key file may be password protected. To correct this, try to import the certificate manually into the current user's personal certificate store.

C:\\Program Files (x86)\\MSBuild\\Microsoft\\VisualStudio\\v12.0\\AppxPackage\\Microsoft.AppXPackage.Targets(1781,9): error APPX0102: A certificate with thumbprint '‎XXXXX' that is specified in the project cannot be found in the certificate store. Please specify a valid thumbprint in the project file.

I have imported the certificate to personal certificates and also to trusted root certificate authorities, still no luck. Is there anyway I can pass in the password? Or if there any better way to resolve this issue?

I had the same problem (not with TFS but with a dedicated build machine). In my case i tried to import the certificate with a different user than i was building with. Importing to the whole machine did not seem to work for some reason. I specifically signed in with the "building user" and imported the certificate from there.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM