title: Different ways how to deal with package reference in csproj
body: <p>Till now, I was always using attributes to control asset dependency for <code>PackageReference</code> (first example). Recently, after using NuGet package manager (in VS), I ended up with quite different XML though.</p>
  
  <p>Both are controlling same thing, could anyone help me understanding difference and need of having two ways how to control similar thing?</p>
  
  <p><a href="https://docs.microsoft.com/en-us/dotnet/core/tools/csproj#packagereference" rel="nofollow noreferrer">Additions to the csproj format for .NET Core > PackageReference</a></p>
  
  <pre><code>&lt;PackageReference Include="Contoso.Utility.UsefulStuff" Version="3.6.0" PrivateAssets="..." IncludeAssets="..." ExcludeAssets="..." /&gt;
  </code></pre>
  
  <p><a href="https://docs.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files#controlling-dependency-assets" rel="nofollow noreferrer">Package references (PackageReference) in project files > Controlling dependency assets</a>:</p>
  
  <pre><code>&lt;PackageReference Include="Contoso.Utility.UsefulStuff" Version="3.6.0"&gt;
      &lt;IncludeAssets&gt;...&lt;/IncludeAssets&gt;
      &lt;ExcludeAssets&gt;...&lt;/ExcludeAssets&gt;
      &lt;PrivateAssets&gt;...&lt;/PrivateAssets&gt;
  &lt;/PackageReference&gt;
  </code></pre>