Signing WPF application for distribution

Wally96333 71 Reputation points
2023-12-10T17:30:12.3666667+00:00

PLEASE Ignore this question and refer to my previous question

https://learn.microsoft.com/en-us/answers/questions/1460328/signing-wpf-application-for-distribution

===================================================

I have developed a WPF application that I intend to sell online.

I understand that I need a certificate to sign the binary files (DLL & EXE).

I have never done this before, so I could use some advice.

From what I can determine, there are a number of different kinds of certificates, and they can cost anywhere from $200 to $1000.

I am aware of the free certificates from "Let's Encrypt", but, from what I understand, they do not work for WPF.

https://letsencrypt.org/docs/client-options/

Can someone point me in the right direction for getting a certificate and signing my binaries?

Any assistance with this would be appreciated.

Thanks.

Developer technologies | Windows Presentation Foundation
Developer technologies | Visual Studio | Other
Developer technologies | C#
{count} vote

Accepted answer
  1. Hui Liu-MSFT 48,681 Reputation points Microsoft External Staff
    2023-12-11T09:53:17.52+00:00

    Hi,@Wally96333 . Welcome to Microsoft Q&A Forum.

    To sign your WPF application for distribution, you'll need a code signing certificate. Here are the steps to obtain a code signing certificate and sign your binaries:

    1.Obtain a Code Signing Certificate:

    You have a few options for obtaining a code signing certificate:

    Purchase from a Commercial Certificate Authority (CA):

    There are several well-known CAs that issue code signing certificates. Examples include DigiCert, Sectigo, GlobalSign, and others.

    Visit the website of a CA, navigate to their SSL/TLS certificates section, and look for code signing certificates.

    Use a Certificate from a Trusted CA:

    Some development tools come with a test certificate that is automatically trusted by most systems. However, these certificates are not suitable for distributing commercial software.

    2.Generate or Acquire the Certificate:

    After obtaining a code signing certificate, you may need to generate a key pair (private key and public key). The process can vary depending on the CA and the tool you are using. Typically, the CA provides instructions for obtaining and installing the certificate.

    3.Sign Your WPF Application:

    Once you have the code signing certificate, you could use a tool like signtool (included in the Windows SDK) to sign your WPF application. Open a command prompt and use a command similar to the following:

    4.Timestamping:

    Including a timestamp (/t) is recommended as it ensures that the signature remains valid even after the certificate expires. It's especially important for long-term software distribution.

    5.Distribute Your Application:

    After signing your binaries, you could distribute your WPF application. Users will see that your application is signed, which can help establish trust and prevent warning messages during installation.

    Please refer to the documentation of the CA you choose for specific instructions on obtaining and using a code signing certificate. Additionally, check the documentation for the signtool utility for detailed information about its usage.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.

    1 deleted comment

    Comments have been turned off. Learn more

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.