4
votes

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?

1

1 Answers

0
votes

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.