Hi,@Bharathiraja Kethappan. Welcome to Microsoft Q&A.
Open certmgr.msc
(C:\Windows\System32), add your certificate in Trusted Root Certification Authorities->Certificates
to make it a trusted certificate.
A simple example: When publishing with ClickOnce
, you create a certificate by Create test certificate
The certificate will be stored in the Personal->Certificates
location (you could confirm it by the creation time).
At this point you could select it and paste
it into Trusted Root Certification Authorities->Certificates
by right clicking->Copy
.
Now you will not get the Unknown Publisher
error when installing the application.
Of course, there are other ways to add trusted certificates (commands, X509Store) that you could refer to:
Add trusted publisher to client box (ClickOnce) - Visual Studio (Windows) | Microsoft Learn
X509Store Class (System.Security.Cryptography.X509Certificates) | Microsoft Learn
Finally, you should ensure that the certificate you update your application with is consistent with the locally stored trusted certificates.
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.