I've recently installed ReSharper and I'm refactoring a number of my C# solutions. As part of this process, I've added references to JetBrains.Annotations in my projects. However, I'm not sure whether I should be marking this dependency as private (to prevent it being passed on as a dependency to higher-level projects) or whether doing this will potentially break things.
In other words, I'm not sure whether I should be doing this:
<ItemGroup>
<PackageReference Include="JetBrains.Annotations" Version="11.0.0" PrivateAssets="All" />
</ItemGroup>
Or simply this:
<ItemGroup>
<PackageReference Include="JetBrains.Annotations" Version="11.0.0" />
</ItemGroup>
From the NuGet package documentation:
All usages of ReSharper Annotations attributes are erased from metadata by default, which means no actual binary reference to 'JetBrains.Annotations.dll' assembly is produced.
If I'm understanding this correctly, it suggests that marking the package as private should be safe. However, I just want to confirm.