0

I'm currently migrating a Jenkins server and I'm having trouble getting some projects to build. The problem projects are failing with this error (which I edited a little for readability):

error MSB3326: Cannot import the following key file: . The key file may be 
password protected. To correct this, try to import the certificate again or
import the certificate manually into the current user's personal certificate 
store.

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1970,9):
error MSB3321: Importing key file "MyCertificate-LP.pfx" was canceled.   
[D:\Jenkins\jobs\keyword_addin\workspace\KeywordOptimization\
KeywordOptimization.AddIn\KeywordOptimization.AddIn.csproj]

The thing is, I've gone and added this certificate to the store of the local system account, which I believe is what Jenkins is running under, and I'm still getting this same error. Furthermore, what I execute

sn -i MyCertificate-LP.pfx personal

and enter in the password on a command prompt running under the System account. I get

Failed to install keypair -- Object already exists

What's even more confusing is that when I run MSBuild from the command line as the Administrative user I'm signed in as, the build succeeds.

I'm not really sure how to trouble shoot this further. If I can't figure out the certificate situation with the System account, is there a way to tell Jenkins to run MSBuild as a user other than 'System'?

steve
  • 23
  • 5
  • //which I believe is what Jenkins is running under,// You have to make sure. The identity of what is running the CI process is everything. – granadaCoder Jul 09 '13 at 20:05
  • Can you login to the machine with the Identity (local system account)....then try? Like...at the windows login screen? – granadaCoder Jul 09 '13 at 20:06
  • Take a look at this "trick"........... http://stackoverflow.com/questions/17172569/error-while-building-application-using-svn-and-cruisecontrol-net/17196123#17196123 – granadaCoder Jul 09 '13 at 20:08

0 Answers0