title: Update CSproj Reference path when nuget install package
body: <h2>Details about Problem</h2>
  
  <p>I currently use nuget for packaging my internal dependencies. (Nuget packages are stored on network disk).</p>
  
  <p>Now I'm trying to improve this process with: 
  - Add Release dll
  - Add debug dll + pdb
  - Add sources
  - Add targets file</p>
  
  <p>So I create this type of structure in my nuget package</p>
  
  <pre><code>|   My.Package.9.9.9.9.nupkg
  |
  +---build
  |   \---net461
  |           My.Package.targets
  |   \---net45
  |   .
  |   .
  |   .
  |
  +---lib
  |   \---net461
  |       +---Debug
  |       |       My.Package.dll
  |       |       My.Package.pdb
  |       |
  |       \---Release
  |               My.Package.dll
  |   \---net45
  |   .
  |   .
  |   .
  +---src
      |   xxxx.cs
      |
      .
      .
      .
  </code></pre>
  
  <p>So now when I add this package in my project under Visual studio, my <code>targets</code> file seems to not work properly or not used. ( the <code>HintPath</code> is not set with different value for the release mode and the debug mode) .</p>
  
  <p>My <code>CSproj</code> is like that when install the nuget package</p>
  
  <pre><code>...
  &lt;ItemGroup&gt;
      ...
      &lt;Reference Include="UnifiedLogin, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"&gt;
          &lt;HintPath&gt;packages\My.Package.9.9.9.9\lib\net461\Release\My.Package.dll&lt;/HintPath&gt;
      &lt;/Reference&gt;
  &lt;/ItemGroup&gt;
  &lt;Import Project="packages\My.Package.9.9.9.9\build\net461\My.Package.targets" Condition="Exists('packages\My.Package.9.9.9.9\build\net461\My.Package.targets')" /&gt;
  &lt;Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"&gt;
      &lt;PropertyGroup&gt;
        &lt;ErrorText&gt;Ce projet fait référence à des packages NuGet qui sont manquants sur cet ordinateur. Utilisez l'option de restauration des packages NuGet pour les télécharger. Pour plus d'informations, consultez http://go.microsoft.com/fwlink/?LinkID=322105. Le fichier manquant est : {0}.&lt;/ErrorText&gt;
      &lt;/PropertyGroup&gt;
      &lt;Error Condition="!Exists('packages\My.Package.9.9.9.9\build\net461\My.Package.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\My.Package.9.9.9.9\build\net461\My.Package.targets'))" /&gt;
  &lt;/Target&gt;
  ....
  </code></pre>
  
  <p>And my <code>targets</code> file is like</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;Project ToolsVersion="4.0"
      xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt;
      &lt;ItemGroup Condition="'$(Configuration)' == 'Debug'"&gt;
          &lt;Reference Include="UnifiedLogin"&gt;
              &lt;HintPath&gt;..\packages\My.Package\lib\Debug\My.Package.dll&lt;/HintPath&gt;
              &lt;Private&gt;True&lt;/Private&gt;
          &lt;/Reference&gt;
      &lt;/ItemGroup&gt;
      &lt;ItemGroup Condition="'$(Configuration)' == 'Release'"&gt;
          &lt;Reference Include="UnifiedLogin"&gt;
              &lt;HintPath&gt;..\packages\My.Package\lib\Release\My.Package.dll&lt;/HintPath&gt;
              &lt;Private&gt;True&lt;/Private&gt;
          &lt;/Reference&gt;
      &lt;/ItemGroup&gt;
  &lt;/Project&gt;
  </code></pre>
  
  <p>So my question is, how I can use my release folder in release and my debug folder in debug :D
  My targets files is not good ?
  Where I did a mistake ?</p>
  
  <p>Thanks in advance for your help</p>