Visual studio 2010 has removed the prompt for a password when you use codesigning with a .pfx file. This means you'll often get this error message:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1970,9): 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_C0D0ACB5FAE2DFE3 [C:\Source\MyProject.csproj]
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1970,9): error MSB3321: Importing key file "mykey.pfx" was canceled. [C:\Source\MyProject.csproj]
This is down as a connect bug here https://connect.microsoft.com/VisualStudio/feedback/details/524792/importing-key-file-was-canceled?wa=wsignin1.0 and sadly no one gives the correct answer.
This is somewhat cryptic and doesn't actually tell you how to fix the problem. So here for future reference is the answer (obviously change the file name and key to match your error message) run it from the command line:
sn.exe -i mykey.pfx VS_KEY_C0D0ACB5FAE2DFE3
Hope this helps.
Just noticed that you use certmgr.exe for installation of pfx for ClickOnce deployment purposes