Showing posts with label Clickonce. Show all posts
Showing posts with label Clickonce. Show all posts

Wednesday, February 13, 2008

Referenced assembly System.Deployment is not installed for ClickOnce?

My computer has been complaining for "Referenced assembly System.Deployment is not installed..." whenever trying to install any ClickOnce apps. And those apps were not installed successfully since sometime. Here are the solutions I found from msdn forum. It worked very well after I delete the ClickOnce store folder.

1. Run "Mage -cc". (Mage.exe can be found in the .NET 2.0 SDK)

2. Uninstall the application via Add/Remove Programs and reinstall it

3. If neither of these work then the last option is to delete the ClickOnce store and get back to clean state. To delete the ClickOnce store delete the folder "%userprofile%\Local Settings\Apps".

Monday, March 12, 2007

Creating Publisher Certificates For ClickOnce

Just found a very useful article for ClickOnce: Creating Publisher Certificates For ClickOnce.

Some quoting from this article:

There is a good article - “Configuring ClickOnce Trusted Publishers“ by Brian Noyes published on MSDN.

Framework SDK contains tool MakeCert. Here is the command line to make a certificate similar to one created by VS:

makecert -r -pe -a sha1 -n "CN=yourcompany" -b 01/01/2000 -e 01/01/2036 -eku 1.3.6.1.5.5.7.3.3 -ss My

The -b and -e option specify the time period when certificate is valid. The -eku option specifies the certificate is intended for code signing. The -a sha1 option is to set the same algorithm that VS uses.

It's important to use the -pe option which allows to export the private key from the certificate. To do this use CertMgr (another tool from Framework SDK). The new certificate will be installed in your personal store. Select it and click on the Export button. Click Next on the first page, and on the second select to export the private key. On the next one you can select some additional options; if not sure just leave on default. After that you will be asked to type password for the file; can be left blank. On the last one specify the file name and location. Finish the wizard and you should get a .pfx file that can be used in VS or imported on user machines.