Wednesday, June 29, 2011

How to create a certificate that can be used in the deployment of a LightSwitch program manually?

You need to use a program called MakeCert.exe to create a certificate that you can use while deploying a Microsoft LightSwitch Application.

You can access the file on your computer if you have Microsoft SDK. You can get the help files using command prompt as shown here,

C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin>makecert /?

This provides you with the description of necessary arguments to create a certificate.

For example for creating a certificate that can be used in the LightSwitch program which requires a code signing certificate the following command line arguments were used:

C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin>MakeCert -sky signature -r -n "CN=hodentek" -pe -a sha1 -len 2048 -ss My -s
r LocalMachine "LS2Tier.cer"

However, after running this program you may have to look on your local machine's certificate store where you will find the certificate. This needs to be exported so that it can be used in a LightSwitch Program when you publish(deploy) the application.

1 comment:

Sergio Mabres said...

Thanks, save my life