title: Overriding dependencies in .nuspec
body: <p>I want to package my project by packing the project file <code>.csproj</code> and not the <code>.nuspec</code>. But I also want to explicitly specify the dependencies.</p>
  
  <p>The problem is that when packing the project file (so that I can use the props from my project) the <code>&lt;dependencies&gt;</code> in the <code>.nuspec</code> file is not being used.</p>
  
  <p>I'm doing this so that I can change my props in one place (in <code>AssemblyInfo.cs</code>) without having to change the <code>.nuspec</code> also with every version. I know I can pack the <code>.nuspec</code> where I'll have full control but this already defeats the purpose. (I'm actually doing exactly this for now until I can override the dependencies)</p>
  
  <p>Is there a way to override the dependencies explicitly in the <code>.nuspec</code>?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Incorporating <code>developmentDependency</code> this <strong>almost</strong> worked. I'm using dependency groups in the nuspec and for some reason nuget is flattening it after packing (of course only when packing the csproj). So this: (just for demonstration)</p>
  
  <pre><code>&lt;dependencies&gt;
    &lt;group&gt;
      &lt;dependency id="Some.Core" version="0.1.0" /&gt;
    &lt;/group&gt;
    &lt;group targetFramework="net4"&gt;
      &lt;dependency id="Microsoft.Bcl.Async" version="1.0.168" /&gt;
    &lt;/group&gt;
    &lt;group targetFramework="net45"&gt;
      &lt;dependency id="Some" version="0.1.0" /&gt;
    &lt;/group&gt;
  &lt;/dependencies&gt;
  </code></pre>
  
  <p>becomes this:</p>
  
  <pre><code>&lt;dependencies&gt;
    &lt;dependency id="Some.Core" version="0.1.0" /&gt;
    &lt;dependency id="Microsoft.Bcl.Async" version="1.0.168" /&gt;
    &lt;dependency id="Some" version="0.1.0" /&gt;
  &lt;/dependencies&gt;
  </code></pre>
  
  <p>And because of that, when using the same package as dependency in different groups an error shows up when packing:</p>
  
  <p><code>An item with the same key has already been added.</code></p>