1

I am running into this issue with Team City C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(2455, 5): error MSB3325: Cannot import the following key file: MYKey.pfx. The key file may be password protected. To correct this, try to import the certificate again or manually install the certificate to the Strong Name CSP with the following key container name: VS_KEY_66BA484DC57004A4

Can this be solved using NANT or Team City?

thechrisberry
  • 177
  • 1
  • 18
  • Did you fix this? I'm facing the same issue and cannot figure it out. http://stackoverflow.com/questions/31326506/teamcity-localservice-pfx-assembly-signing-where-to-install-the-certificate – Jammer Jul 09 '15 at 19:45

1 Answers1

2

Sounds like the user you running TeamCity may not have the rights/permissions to that file/folder. Go to you Services and Change the 'TeamCity Build Agent Service' to a admin user. You can always test this with your account anything other than the default 'Local System' Account.

Geddon
  • 1,266
  • 1
  • 11
  • 31
  • Go advice I will give this a try. – thechrisberry Feb 20 '14 at 20:57
  • It's still already run under a admin user, but same error. The key file have password protected, if that makes any difference from original question. – liang Jul 13 '15 at 16:17
  • My error was slightly different but this solved it! `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.` `Importing key file "my.pfx" was canceled.` – Nateous Aug 25 '16 at 21:43