title: Nuget: dependencies between projects in a solution
body: <p>I can't figure out how to create a package with references to a solution project and a third party assembly</p>
  
  <p>I have a solution with 2 projects, <code>A</code> and <code>B</code>. <code>B</code> references <code>A</code>. Also, <code>B</code> references <code>C</code> which is a dll located in <code>Solution/libs</code></p>
  
  <p><code>A</code> and <code>B</code> are supposed to be nuget packages.</p>
  
  <p>I have a <code>B.nuspec</code> file which is the following:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;package xmlns="http://schemas.microsoft.com/packaging/2011/10/nuspec.xsd"&gt;
    &lt;metadata&gt;
      &lt;id&gt;B&lt;/id&gt;
      &lt;version&gt;$version$&lt;/version&gt;
      &lt;title&gt;B&lt;/title&gt;
      &lt;authors&gt;me&lt;/authors&gt;
      &lt;owners&gt;me&lt;/owners&gt;
      &lt;requireLicenseAcceptance&gt;false&lt;/requireLicenseAcceptance&gt;
      &lt;description&gt;Description&lt;/description&gt;
      &lt;copyright&gt;Copyright © me 2016&lt;/copyright&gt;
      &lt;references&gt;
        &lt;reference file="C.dll" /&gt;
      &lt;/references&gt;
    &lt;/metadata&gt;
    &lt;files&gt;
       &lt;file src="..\libs\RMS\C.dll" target="lib"/&gt;
    &lt;/files&gt;
  &lt;/package&gt;
  </code></pre>
  
  <p>I ran the following command:
  <code>nuget pack B.csproj -IncludeReferencedProject</code>
  As it is said in the nuget documentation, nuget will combine information from csproj and nuspec. However...</p>
  
  <p>It gives me a nupkg with <code>A.dll</code> and <code>B.dll</code> in <code>\lib\net45</code> and <code>C.dll</code> in <code>\lib</code>. Also there's a nuspec file</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;package xmlns="http://schemas.microsoft.com/packaging/2011/10/nuspec.xsd"&gt;
    &lt;metadata&gt;
      &lt;id&gt;B&lt;/id&gt;
      &lt;version&gt;1.0.31&lt;/version&gt;
      &lt;title&gt;B&lt;/title&gt;
      &lt;authors&gt;me&lt;/authors&gt;
      &lt;owners&gt;me&lt;/owners&gt;
      &lt;requireLicenseAcceptance&gt;false&lt;/requireLicenseAcceptance&gt;
      &lt;description&gt;Description&lt;/description&gt;
      &lt;copyright&gt;Copyright © me 2016&lt;/copyright&gt;
      &lt;dependencies&gt;
        &lt;dependency id="log4net" version="2.0.2" /&gt;
        &lt;dependency id="JetBrains.Annotations" version="9.2.0" /&gt;
        &lt;dependency id="morelinq" version="1.4.0" /&gt;
      &lt;/dependencies&gt;
      &lt;references&gt;
        &lt;reference file="C.dll" /&gt;
      &lt;/references&gt;
    &lt;/metadata&gt;
  &lt;/package&gt;
  </code></pre>
  
  <p>And when I install the package into a project, none of <code>A</code>, <code>B</code>, <code>C</code> are referenced.</p>
  
  <p>What's wrong with my setup? Is there a way to create a package with dependencies taken from csproj and references specified manually (or maybe there's some hidden convention?)</p>