Search code examples
c#nugetproject-reference

nuget reference from other solution


I have 2 solutions:

  • Solution1
    • Project1.1: references nuget package NU1
  • Solution2
    • Project2.1: references Solution1 / Project1.1

When I build Solution2 it fails because nuget pulls the NU1 package to the packages of Solution2, and when Project1.1 is built as a dependency, the package NU1 is missing.

Prior questions and answers have convinced me to reference projects better that .dlls -- however, I am afraid I have not yet understood how to follow this guideline when working with nuget.

Thank you in advance for your comments!


Solution

  • Eventually, I managed like this:

    • created a packages directory parallel to solution directories
    • each solution get a nuget.config file with

    => all solutions use same packages :)