NuGet install.ps1 脚本中的 $package 和 $project 参数包含什么? [英] What do the $package and $project params contain in a NuGet install.ps1 script?

查看:66
本文介绍了NuGet install.ps1 脚本中的 $package 和 $project 参数包含什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为 NuGet 包编写我的第一个安装 PowerShell 脚本.我正在尝试将 lib 文件夹中的文件复制到另一个 NuGet 包的 tools 文件夹中.默认的 install.ps1 脚本有四个参数,其中两个是:

I'm writing my first install PowerShell script for a NuGet package. I'm trying to copy a file from the lib folder into the tools folder of another NuGet package. The default install.ps1 script has four parameters, two of which are:

  • $package
  • $project

它们似乎是某种对象",但我不确定它们包含哪些属性和方法.我在网上做了一些搜索,但还没有找到这些论点的参考或任何文档.

They appear to be "objects" of some sort, but I'm not sure what properties and methods they contain. I've done some searching online, but have yet to find a reference or any documentation for these arguments.

查看这篇 StackOverflow 帖子,该问题包含指向 项目界面的链接.那是 NuGet install.ps1 文件中的 $project 吗?

Looking at this StackOverflow post, the question contains a link to Project Interface. Is that what $project is in the NuGet install.ps1 file?

推荐答案

在 NuGet 2 中:

In NuGet 2:

  • $project => EnvDTE.Project - which is the Visual Studio object model for a project.
  • $package => NuGet.IPackage - the NuGet package.

在 NuGet 3 中:

In NuGet 3:

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