by Laurent Kempé
3. November 2009 00:28
To be able to run a build on TeamCity of a Visual Studio solution containing a ClickOnce manifest which needs to be signed, you will need to add the certificate to the Windows account on which TeamCity services runs.
TeamCity run under Local System account per default.
So you need to add the certificate to this account! But how do you do that?
You will need a tool from SysInternals called PsExec, then using PsExec:
> Psexec.exe -i -s cmd.exe
you will have ran a command prompt on your system in the Local System Account (LSA).
Using that new command prompt, cd to the folder containing your certificate and start it
> my_TemporaryKey.pfx
Then you will face the Certificate Import Wizard in which you click Next > Next > Type the password > Next.
Your certificate is installed now for Local System Account (LSA), and your build should work now.
Enjoy!