尝试
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
文件未添加到工具目录中。
答案 0 :(得分:2)
<files>
<file src="..\..\..\common\Uninstall-ChocolateyZipPackage030.ps1" target="tools\Uninstall-ChocolateyZipPackage030.ps1" />
<file src="tools\*" target="tools" />
</files>
将所有文件添加到nupkg
文件中。