1

I am trying to build an Out Of Browser Silverlight app with Elevated permissions required. I've followed these instructions to create a code signing certificate and I've checked the box to 'Sign the Xap File' in the properties pane in VS2010. I'm able to build and test out the functionality on my local machine. When I try to build with msbuild on the build server though, I get these errors:

  • 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.
  • error MSB3321: Importing key file "MySPC.pfx" was canceled.

I've installed the "MyCA.cer" (self signed CA) to the Trusted Root Certificate Athorities store on the build server and I have tried installing the "MySPC.pfx" the the same store and to the Trusted Publishers store to no avail.

Has anyone had any experience doing this?

Community
  • 1
  • 1
vanillaike
  • 135
  • 1
  • 8

2 Answers2

2

I ended up having to sign the .xap with a certificate from our CA server. This way we don't have to install a certificate on any of the users machines that run the silverlight app out of browser.

vanillaike
  • 135
  • 1
  • 8
1

Excuse the obvious question but, you are entering the correct password for the certificate, aren't you?

For reference I also had an issue installing a certificate on a build server until I installed all the certificates in the chain on that box also.

Matt Lacey
  • 65,560
  • 11
  • 91
  • 143
  • Yes, I kept the passwords simple so that I would use the correct password. You had to install every certificate on your build server? Not just the MyCA.cer and the MySPC.pfx certificates? – vanillaike Dec 08 '10 at 13:57
  • Yep. Couldn't work out what gap in the chain was causing issues and so ended up installing about 20 :( Also had to make sure they were installed for the account the build script was running under too. – Matt Lacey Dec 08 '10 at 14:05