Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Visual Studio, can I disable signing my application when in debug?

In Visual Studio's Project Properties -> Signing tab, I have signed my project with a code-signing certificate. On my team, however, I'm the only one with the code-signing certificate, even though we're in a multiple-developer environment. When the other developers try to "Start Debugging", they get the following message:

"cannot find the certificate that matches the project system thumbprint"

Anyone have any suggestions for allowing them to debug their project, but only allow me to publish?

like image 469
Peder Rice Avatar asked Oct 16 '25 10:10

Peder Rice


2 Answers

One thing that might work is adding a post-build event to call a script that does your signing. You could use something like signtool.exe to sign the files when you publish them.

You could make multiple versions of a script file, for instance: Debug_sign.bat, Release_sign.bat

Then in your Post-build event command line:
call "$(ProjectDir)$(ConfigurationName)_sign.bat"
would call the correct script depending on your target.

Only the release script would actually sign the output files. The debug script file could just do nothing..

I've used signtool to sign an assembly with a .pfx like this:
signtool.exe sign /f "codesign_cert.pfx" /p "cert_password" /d "App description" /du "http://mywebsite" myApp.exe

like image 118
markt Avatar answered Oct 19 '25 13:10

markt


Would delayed signing do the trick for you?

like image 24
JasonRShaver Avatar answered Oct 19 '25 12:10

JasonRShaver



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!