We are building an Outlook plugin in C#. It is built without problems in VS and signed with a temporary pfx certificate. We want to put the build process in Jenkins and have it run automatically.
We tried to run the VS solution with MSBuild. It works great on the development machine but in Jenkins there is an error:
Cannot import the following key file: OutlookPlugin_TemporaryKey.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_A688DC31A30F3EF1
We don't know how to specify the pfx password for the automated build. Or otherwise automate the sign process.
One solution we found was to open the project in VS on the same machine and as the same user as for the automated process and type the password. This doesn't work, probably because Jenkins wipes out the workspace every time. If we try to compile without signing and then sign it afterwards, it complains that a ClickOnce assembly must be signed. It seems that Office plugins must use ClickOnce.
So, how to specify the pfx password somewhere in the build file ?
We use VS 2010 with Office Tools.