我正在尝试创建一个巧克力包装。我最初创建了一个没有任何依赖项的版本,我只是在 tools/bin 目录中放置了一个 exe 文件,然后制作了一个简单的 nuspec 文件,这将正确地将 exe 文件安装到路径中,这就是我所需要的这个内部工具。
但是,该项目现在已经过重组,因此它依赖于外部依赖项。依赖项是一个 nuget 包,它与主项目位于同一存储库中。要添加依赖项,我将其添加到依赖项部分。Visual Studio 中的项目本身也依赖于此。这是我的nuspec文件:(我删除了一些数据,用rm标记,但应该不会影响它。其他一切都一样)
<?xml version="1.0" encoding="UTF-8"?>
<!-- Do not remove this test for UTF-8: if “Ω” doesnt appear as greek uppercase omega letter enclosed in quotation marks, you should use an editor that supports UTF-8, not this one. -->
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<!-- Read this before publishing packages to chocolatey.org: https://github.com/chocolatey/chocolatey/wiki/CreatePackages -->
<id>lisp-translator</id>
<title>lisp-translator (Install)</title>
<version>0.1.0</version>
<authors>rm</authors>
<owners>rm</owners>
<summary>rm</summary>
<description>rm</description>
<projectUrl>rm</projectUrl>
<tags>lisp-translator admin</tags>
<copyright />
<licenseUrl>rm</licenseUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<!--<iconUrl>http://cdn.rawgit.com/__REPLACE_YOUR_REPO__/master/icons/lisp-translator.png</iconUrl>-->
<dependencies>
<dependency id="LispParsingLibrary" version="1.1.0.17190" />
</dependencies>
<releaseNotes />
</metadata>
</package>
但是,当我尝试安装它时,我得到一个相当深奥的错误:
lisp-translator not installed. An error occurred during installation:
External packages cannot depend on packages that target projects.
The install of lisp-translator was NOT successful.
lisp-translator not installed. An error occurred during installation:
External packages cannot depend on packages that target projects.
Chocolatey installed 0/1 package(s). 1 package(s) failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Failures:
- lisp-translator
关于添加此依赖项,我做错了什么?