Description
I need to sign the nuget packages (MathNet.Numerics
) before I build my project, to do this, I'm using Nivot.StrongNaming
package, and I run the commands below in the Package Manager Console:
Install-Package Nivot.StrongNaming
$root = join-path (split-path $dte.solution.filename) packages
$solution = (split-path $dte.solution.filename)
$key = Import-StrongNameKeyPair -KeyFile $solution\MuProjectFolder\Key.snk
dir -rec $root\MathNet.Numerics.3.11.0\*.dll | where { -not (Test-StrongName $_) } | Set-StrongName -KeyPair $key -Verbose
(NOTE I cannot use the signed version of the packages, since this is a shared project, it will break other projects...)
Question
Is there a way I can add these steps to TeamCity before it attempts to build the solution? That would ensure that we have it signed.
How can I run some Package Manager Console commands (Visual Studio) in a build step in the Team City project?
Can I run it as a Command Line?