CAPICOM Build Error on ClickOnce Publishing

I was working with Paul Sheriff of PDSA this week to ClickOnce deploy a reporting tool we use for the Regional Directors program. We ran into a problem where we got the following error when we tried to publish:


The resolution was to obtain the correct version of the CAPICOM.dll, drop it into the \SDK\bin directory where the SignTool.exe lives (C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin with a default VS install), and then register the library with Regsvr32.exe). Since it is a COM library for the CryptoAPI, it can actually live anywhere on your machine once it is registered.

Not sure how this was not there on the machine in question, it normally gets installed and registered when you install VS according to the ClickOnce product team folks.