title: error msb3325 cannot import key file
body: <p>I recently cloned a build machine, renamed the machine on the domain, and moved the machine from a SATA drive to a SSD drive. </p>
  
  <p>I am trying to setup a new build for a new branch within SVN. 
  The application is a combination of Visual Studio 2010 C# and VB.NET code and VB6 code</p>
  
  <p>When the first project tries to compile from the command line it fails to compile with the error:
  "error MSB3325: Cannot import the following key file: "MyFile1.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_##########"</p>
  
  <p>Now I can open the Visual Studio 2012 IDE and build the project successfully, both Release and Debug mode. In any order. </p>
  
  <p>Things I have tried to resolve this:</p>
  
  <ol>
  <li>I have opened the proj file and selected properties, signing, and tried selecting the "MyFile1.pfx" file again. </li>
  <li>I have tried signing the MyFile1.pfx file again.</li>
  <li>I have left the Visual Studio 2012 project open, and opened a command window. I have tried 'sn -i xxxxx.pfx VS_xxxxxxx", enter password when prompted</li>
  <li>I have tried manually editing the .*proj files and removing references to MyFile1.pfx file and rebuilding the projects and then adding the "MyFile1.pfx" file again. </li>
  </ol>
  
  <p>In each of these cases, the command line build fails and the Visual Studio build succeeds. </p>
  
  <p>My command line build is us using the solution files for the build and calls devenv.com to build the solution. </p>
  
  <p>I am confused as to why the IDE build works and the command line does not, my guess it has something to do with building from the .com verses the exe. </p>
  
  <p>Is there anything else I can do other than building up a new build machine from scratch for this branch build? </p>
  
  <p>Thank you. </p>
  
  <p>Dan</p>