Execute build script after build but before nuget packaging
I have a post-build script that strongname-signs my compiled assembly. However, I can see that this script is being executed after the nuget artifact is packaged which means the dll in the nuget package stays unsigned. Is there any way to make sure my post-build script executes immediately after the build?
Or do I need to disable 'Package NuGet projects' and incorporate that action directly into my post-build script? I suppose unpacking + sign + repacking the the nuget package would also work, but is not ideal.
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Feodor Fitsner on 19 Aug, 2014 04:52 PM
I would incorporate signing logic into post build target inside csproj file. Otherwise, yes, you can disable auto-packaging and call nuget pack command from your after build script.
- Feodor
2 Posted by ctstone on 19 Aug, 2014 08:40 PM
Thanks!
Here's what I did in case anyone is curious:
Environment Variables
StrongNameKey= secure string containing base64 encoded key bytes
StrongNameKeyPath= "c:\keys\mykey.snk"
Install Script
.csproj
And nothing at all in the post-build script.
Support Staff 3 Posted by Feodor Fitsner on 19 Aug, 2014 08:42 PM
Awesome, thanks for sharing the solution!
Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:47 AM.