Uninstall.ps1 的替代方案,因为它不适用于 nuget 3.x [英] Alternative for Uninstall.ps1 as it is not run for nuget 3.x

查看:82
本文介绍了Uninstall.ps1 的替代方案,因为它不适用于 nuget 3.x的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 NuGet 3.x 以后的项目中,使用 project.json 的 Install.ps1 和 Uninstall.ps1 文件不会运行.是否有其他方法可以在卸载我的软件包时运行 powershell 脚本?

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?

推荐答案

不,但是当你说它作为 NuGet 3.x 以后它是不正确的,使用 project.json 管理依赖项的项目的 NuGet 3.0+ 客户端不运行安装/卸载脚本,但如果项目使用的是 packages.config,则运行这些脚本.

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.

您可以查看的一种替代方法是使用 VS 扩展来侦听引用添加并使用 VS 可扩展性执行某些操作.

One alternative you can look at is have a VS extension that listens for reference add and executes some action using VS extensibility.

这篇关于Uninstall.ps1 的替代方案,因为它不适用于 nuget 3.x的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆