title: Ensure at compile time that PackageReference of my Project is not required for consumers of my Project
body: <p>I want to ensure at compile time that a PackageReference of my Project is not required for consumers of my Project.</p>
  <p><strong>Example</strong></p>
  <p>Project.csproj contains this PackageReference:</p>
  <p><code>&lt;PackageReference Include=&quot;Microsoft.EntityFrameworkCore&quot; Version=&quot;5.0.3&quot; PrivateAssets=&quot;All&quot; /&gt;</code></p>
  <p>This means that Microsoft.EntityFrameworkCore will not flow to the consumers of Project.</p>
  <p>However, if I expose a public method in Project with a signature containing a type from Microsoft.EntityFrameworkCore, the consumer will have to install Microsoft.EntityFrameworkCore in their project as well. An example could be the following method in a public class in Project:</p>
  <p><code>public DbSet&lt;Blog&gt; GetDbEntries()</code></p>
  <p>I want to instruct the compiler to forbid such type-bleeding to consumers, is that possible?</p>