Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 720
jakub Avatar asked Apr 12 '18 14:04

jakub


1 Answers

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.

like image 85
Leo Liu-MSFT Avatar answered Nov 08 '22 11:11

Leo Liu-MSFT