【问题标题】:Include non-Solution items in Nuget package在 Nuget 包中包含非解决方案项
【发布时间】:2018-01-10 11:18:23
【问题描述】:

我创建了一个包含以下 files 元素的 Nuspec 文件:

<files>
    <file src="lib\" target="lib" />
    <file src="tools\" target="tools" />
    <file src="content\" target="content" />
    <file src="other-stuff\" target="content" />
</files>

当我将此 Nuget 包恢复到任何项目时,other-stuff 文件夹的内容将添加到项目中(如预期的那样)。

有什么方法可以确保此内容放置在文件系统中,但未添加到项目/解决方案中?我不希望此内容显示在 Visual Studio 中。

【问题讨论】:

    标签: nuget nuget-package nuspec


    【解决方案1】:

    无法在 nuspec 文件中创建没有内容的文件夹。但是,您绝对可以使用 install.ps1 文件来执行此操作。您可以通过搜索“nuget install.ps1”并使用 powershell 代码创建目录来找到许多示例。

    【讨论】:

      猜你喜欢
      • 2017-09-26
      • 2011-09-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多