Till now, I was always using attributes to control asset dependency for PackageReference (first example). Recently, after using NuGet package manager (in VS), I ended up with quite different XML though.
Both are controlling same thing, could anyone help me understanding difference and need of having two ways how to control similar thing?
Additions to the csproj format for .NET Core > PackageReference
<PackageReference Include="Contoso.Utility.UsefulStuff" Version="3.6.0" PrivateAssets="..." IncludeAssets="..." ExcludeAssets="..." /> Package references (PackageReference) in project files > Controlling dependency assets:
<PackageReference Include="Contoso.Utility.UsefulStuff" Version="3.6.0"> <IncludeAssets>...</IncludeAssets> <ExcludeAssets>...</ExcludeAssets> <PrivateAssets>...</PrivateAssets> </PackageReference>