In NuGet 3.x onwards in projects which use project.json the Install.ps1 and Uninstall.ps1 files are not run. Is there an alternate method by which I can run a powershell script when my package is uninstalled?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
No, however its not correct when you say it as NuGet 3.x onwards, NuGet 3.0+ clients working on projects using project.json way of managing dependencies will not run install/uninstall scripts but if the project is using the packages.config then these scripts are run.
One alternative you can look at is have a VS extension that listens for reference add and executes some action using VS extensibility.