Reputation: 7977
I'm just getting to grips with nuget after avoiding it for a while. I was wondering if it was possible to run some C# code when you install, update or uninstall a nuget package?
For example I'd like to run a set of database changes which are within a .sql file within my package once the package is installed.
I'd appreciate if someone could let me know if this is possible and if so point me in the right direction. Thanks
Upvotes: 2
Views: 829
Reputation: 19474
Yes, you can use powershell so you can write some c# code and run please check link
Well instead of copy paste not my own job here is link to real example
Upvotes: 2