0

Currently, I am looking for a solution, how can I store my signing certificate and implement application signing step during building solution (.Net) on TeamCity.

Cannot find any appropriate solution, and do not think that put certificate in NuGet package is good solution.

Could some-one make a hint how can I achieve it?

Alex
  • 842
  • 11
  • 33
  • Is this what you wanted ?http://stackoverflow.com/questions/14980207/teamcity-build-agent-becomes-disconnected-after-adding-self-signed-https-certifi – Pratap Das Feb 02 '17 at 16:59
  • No, this is related to certification of agent. And I am trying to sing my application during building it on TeamCity. – Alex Feb 02 '17 at 17:07
  • What kind of signing? Is this about strong-signing your assemblies with a `.snk` key? – sferencik Feb 02 '17 at 18:04
  • Aren't these snk or pfx files part of project? If you build solution, it all should come automatically – T.S. Feb 02 '17 at 19:53
  • Yes, this is snk/pfx file, but secured with a password. I would like to store it separately from the solution. – Alex Feb 03 '17 at 10:49

1 Answers1

0

You could have the certificate on the buildagents machine at a specific directory or add an extra directory from your repository where the certificate is.

Then you can add an extra visual studio proj file in your solution which is the one that you use when you build your release build in TeamCity. This proj file will contain the signing of your application along with compiling etc.

Now I don't know what kind of signing you are using, we have a clickOnce application that is being signed, where we are using these three steps:

<Exec Command="&quot;$(SdkPath)\mage.exe&quot; -sign &quot;$(ClickOncePublishDirectory)\app.exe.manifest&quot; -CertFile $(SigningCert) -pwd $(SigningPassword)"/>  
<Exec Command="&quot;$(SdkPath)\mage.exe&quot; -update  &quot;$(ClickOncePublishDirectory)\application&quot; -AppManifest &quot;$(ClickOncePublishDirectory)\app.exe.manifest&quot; -Publisher &quot;Name in certificate&quot; -a sha256RSA"/>
<Exec Command="&quot;$(SdkPath)\mage.exe&quot; -sign  &quot;$(ClickOncePublishDirectory)\application&quot; -CertFile $(SigningCert) -pwd $(SigningPassword)"/>
dennis_ler
  • 659
  • 1
  • 9
  • 36