What I want to achieve?
Code sign my VSTO Outlook Plugin using Visual Studio 2022. I follow these instructions: https://learn.microsoft.com/en-us/visualstudio/vsto/how-to-sign-office-solutions?view=vs-2022
Environment
- Windows 11 (German), Visual Studio 2022 17.6.0
- USB Hardware Token (Sectigo eToken 5110, Card Type IDPrime)
- SafeNet Authentication Client 10.8 R8
What is the problem?
Choosing the Sectigo Certificate for signing my code fails:
The German text says something like this:
The requested operation cannot be performed with the smart card or another smart card is required for the operation
What I already tried
I successfully installed SafeNet Authentication Client. I successfully changed the password. Furthermore, I can successfully run certutil -scinof (it pops up the SafeNet Client and asks for the password, which I can enter so that certutil shows success).
The certificate is available under my windows (user certificates):
What actually seems to work is to use code signing from the cmd line like described by sectigo (https://www.sectigo.com/knowledge-base/detail/Code-Signing-with-an-OV-or-an-EV-Code-Signing-Certificate/kA03l000000c4TX):
signtool sign /tr http://timestamp.sectigo.com /td sha256 /fd sha256 /a "C:\Users\heckner\source\repos\xxx\build\setup.exe"
During signing process the popup saying that the smartcard is not working comes up twice, but after that a password prompt from SafeNet Client popups up and after entering the password it seems to work.
When I check the signature on the signed exe it seems ok:
The problem is that I still receive the message from Microsoft during installation of this setup like:
What could help?
- Perhaps someone can show me what to do manually to sign a VTSO Outlook plugin. Setup.exe seems not the solution.
- https://developercommunity.visualstudio.com/t/Visual-studio-doesnt-detect-digicert-co/10135932?entry=problem









