How to create a package that depends on a package that is “project-oriented”?

I'm trying to make a chocolate bag. First, I created a version that had no dependencies, and I just placed the exe file in the tools / bin directory, and then made a simple nuspec file, and this will correctly install the exe file in the path, which is all I need for this internal tool .

However, the project is now restructured, so that it depends on external dependence. A dependency is a nuget package that is in the same repository as the main project. To add a dependency, I added it to the dependency section. The project itself in Visual Studio also depends on the same. Here is my nuspec file: (I deleted some data marked with rm, but this should not affect it. Everything else is the same)

<?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> 

However, when I try to install it, I get a rather esoteric error:

 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 

What am I doing wrong regarding adding this dependency?

+6
source share
1 answer

This is a really old, dumb nuget packaging problem. The LispParsingLibrary package has a folder called "content". This means that your package will also need a content folder.

We do not recommend this at all. Ask the maintainer LispParsingLibrary to delete this folder or create it when installing and copying files.

I thought we had a problem with this, but I added https://github.com/chocolatey/choco/issues/290

+1
source

Source: https://habr.com/ru/post/987691/


All Articles