title: What might be causing apparent nuget package self-references?
body: <p>I have a project file targeting <code>net 472</code>.  It depends on a bunch of libraries that are built against <code>netstandard2</code>.  Some of those libraries depend upon the <strong>Microsoft.Extensions.Primitives</strong> library although (as far as I can tell) there is no directly dependency from the root project.  When I build it, I see this warning...</p>
  <pre><code>Severity    Code    Description Project File    Line    Suppression State
  Warning     Found conflicts between different versions of &quot;Microsoft.Extensions.Primitives&quot; that could not be resolved.
  There was a conflict between &quot;Microsoft.Extensions.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60&quot; and &quot;Microsoft.Extensions.Primitives, Version=5.0.0.1, Culture=neutral, PublicKeyToken=adb9793829ddae60&quot;.
      &quot;Microsoft.Extensions.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60&quot; was chosen because it was primary and &quot;Microsoft.Extensions.Primitives, Version=5.0.0.1, Culture=neutral, PublicKeyToken=adb9793829ddae60&quot; was not.
  
  
      References which depend on &quot;Microsoft.Extensions.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60&quot; [C:\Users\neilm\.nuget\packages\microsoft.extensions.primitives\5.0.0\lib\net461\Microsoft.Extensions.Primitives.dll].
          C:\Users\neilm\.nuget\packages\microsoft.extensions.primitives\5.0.0\lib\net461\Microsoft.Extensions.Primitives.dll
            Project file item includes which caused reference &quot;C:\Users\neilm\.nuget\packages\microsoft.extensions.primitives\5.0.0\lib\net461\Microsoft.Extensions.Primitives.dll&quot;.
              C:\Users\neilm\.nuget\packages\microsoft.extensions.primitives\5.0.0\lib\net461\Microsoft.Extensions.Primitives.dll
  
      References which depend on &quot;Microsoft.Extensions.Primitives, Version=5.0.0.1, Culture=neutral, PublicKeyToken=adb9793829ddae60&quot; [].
          C:\Users\neilm\.nuget\packages\lazycache\2.1.3\lib\netstandard2.0\LazyCache.dll
            Project file item includes which caused reference &quot;C:\Users\neilm\.nuget\packages\lazycache\2.1.3\lib\netstandard2.0\LazyCache.dll&quot;.
              C:\Users\neilm\.nuget\packages\lazycache\2.1.3\lib\netstandard2.0\LazyCache.dll
              D:\work\code\b6\Backend\CSharp\Libraries\Standard\TableAccess_std\bin\Debug\netstandard2.0\TableAccess_std.dll
              D:\work\code\b6\Backend\CSharp\Libraries\Standard\CommsCode_std\bin\Debug\netstandard2.0\CommsCode_std.dll
              D:\work\code\b6\Backend\CSharp\Libraries\Standard\Recognisers\bin\Debug\netstandard2.0\Recognisers.dll
  
  </code></pre>
  <p>The relevant section, elided for readability, is</p>
  <pre><code>References which depend on &quot;Microsoft.Extensions.Primitives, Version=5.0.0.0,... 
  C:\Users\neilm\.nuget\packages\microsoft.extensions.primitives\5.0.0\lib\net461\Microsoft.Extensions.Primitives.dll
  
  Project file item includes which caused reference...
  C:\Users\neilm\.nuget\packages\microsoft.extensions.primitives\5.0.0\lib\net461\Microsoft.Extensions.Primitives.dll
  </code></pre>
  <p>which seems to be describing a self-reference.  Any idea how this might be occurring? I've tried nuking the package cache, as well as the bin and obj folders but can't seem to get rid of it.  TIA.</p>
  <p><em>Edit</em> I should probably add this is just one of a number of <strong>System</strong> packages for which I am getting this warning.  Others include:</p>
  <ul>
  <li>System.Diagnostics.DiagnosticsSource</li>
  <li>System.Memory.Data</li>
  </ul>
  <p><em>Edit 2</em> In case it is relevant, the root project is an Azure Cloud Service &quot;Classic&quot; worker role built using the Azure SDK which is why (regrettably) I can't just target .Net5 to try and work around this.</p>
  <p><em>Edit 3</em> The conflicts appear to be resolved when adding local dependencies at a matching version but I would still like to understand where the original conflict is coming from and what the warning is trying to tell me.  I <em>think</em> it is implying that the 472 framework depends on a different version of those packages/dlls but if so it's unclear what the appropriate resolution should be.</p>