jakub
jakub

Reputation: 121

nuget package not installing dependencies

I've created a nuget package which has 2 dependencies.

<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
  <metadata>
    <id>ConsoleApp2</id>
    <version>1.0.0</version>
    <title>ConsoleApp2</title>
    <authors>XX</authors>
    <owners>XX</owners>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <description>Description</description>
    <copyright>Copyright ©  2018</copyright>
    <dependencies>
      <dependency id="AutoMapper" version="6.2.2" />
      <dependency id="NHibernate" version="4.0.4.4000" />
    </dependencies>
  </metadata>
</package>

I would like install this nuget package to other project but it is't download and install AutoMapper or NHibernate and i don't have any reference. from csproj To create nuget package I'm using nuget.exe version 4.6.2 but other version also don't work.

However if I use method with app.config and package.config it's works well, but I need use first method.

from package.config:

from package.config

Upvotes: 12

Views: 13025

Answers (1)

Leo Liu
Leo Liu

Reputation: 76928

nuget package not installing dependencies

Probably you have select the Ignore Dependencies for Dependency behavior in the options Install and Update options on the nuget package manager UI. To check it, please extend the options button:

enter image description here

If yes, please set it to the default value Lowest.

Upvotes: 3

Related Questions