A ClickOnce application must be signed using a certificate. You can buy a real certificate or create a Test Certificate by your own. Visual Studio 2010 helps in creating such a Test Certificate. It offers a wizard and is very easy to use. The draw-back of the simple feature is that you can not do customization.
Create a Test Certificate in Visual Studio
Disadvantages of Visual Studio Test Certificate
If you want to deploy your application with such a Test Certificate you need to consider the following disadvantages:
- “Issued To” and “Issued By” will contain the user name of your current windows account
- “Expiration Date” is set to “Expires in one year”
Create a more customized Test Certificate (pfx)
If you want to create a more customized Test Certificate, you can do that by using the following script.
makecert -sv ClickOnceTestApp.pvk -n CN=Sample ClickOnceTestApp.cer -b 01/01/2012 -e 12/31/2100 -r pvk2pfx -pvk "ClickOnceTestApp.pvk" -spc "ClickOnceTestApp.cer" -pfx "ClickOnceTestApp.pfx"
To learn more about the used tools
Add your Test Certificate to your Visual Studio Project
Download the Script Sample