如何使用NuGet将其他文件添加到包中?

时间:2014-12-01 21:06:35

标签: nuget chocolatey

尝试

Nuspec

<files>
  <file src="https://raw.githubusercontent.com/030/chocolateyautomatic/master/common/Uninstall-ChocolateyZipPackage030.ps1" target="tools" />
</files>

结果

文件未添加到工具目录


正在运行cpack表示以下内容:

Calling 'C:\ProgramData\Chocolatey\chocolateyinstall\nuget.exe pack  -NoPackageAnalysis
Attempting to build package from 'eclipse.nuspec'.
The given path's format is not supported.

尝试两次

  <files>
    <file src="path\to\chocolateyautomatic\common\Uninstall-ChocolateyZipPackage030.ps1" target="tools\Uninstall-ChocolateyZipPackage030.ps1" />
  </files>

结果二

The given path's format is not supported.问题已消失,但Uninstall-ChocolateyZipPackage030.ps1文件未添加到工具目录中。

1 个答案:

答案 0 :(得分:2)

  <files>
    <file src="..\..\..\common\Uninstall-ChocolateyZipPackage030.ps1" target="tools\Uninstall-ChocolateyZipPackage030.ps1" />
    <file src="tools\*" target="tools" />
  </files>

将所有文件添加到nupkg文件中。

相关问题