title: How can I hide dependent Nuget packages?
body: <p>I have a class library project file like this:</p>
  <pre><code>&lt;Project Sdk=&quot;Microsoft.NET.Sdk&quot;&gt;
  
    &lt;PropertyGroup&gt;
      &lt;TargetFramework&gt;net6.0-windows&lt;/TargetFramework&gt;
      &lt;ImplicitUsings&gt;enable&lt;/ImplicitUsings&gt;
    &lt;/PropertyGroup&gt;
  
    &lt;ItemGroup&gt;
      &lt;PackageReference Include=&quot;InformationLog&quot; Version=&quot;2.1.1&quot; /&gt;
    &lt;/ItemGroup&gt;
  
  &lt;/Project&gt;
  </code></pre>
  <p>My class library has various public types, such as <code>PublicClass1</code>. The Nuget package <code>InformationLog</code> has a public type named <code>Log</code>. My class library needs <code>Log</code> internally to work, but I don't want to make this type visible to users of my class library. I want people to have access to <code>PublicClass1</code> but not to <code>Log</code> or any of the other types or namespaces in <code>InformationLog</code>.</p>
  <p>I'm OK with keeping <code>InformationLog</code> as a dependency, forcing projects that reference my class library to also use the <code>InformationLog</code> nuget package, I just don't want the types in that Nuget package to be visible.</p>
  <p>Ideally I would like some XML in my project file to fix this. Something like this:</p>
  <pre><code>  &lt;PackageReference Include=&quot;InformationLog&quot; Version=&quot;1.9.0&quot; Access=&quot;Private&quot;/&gt;
  </code></pre>
  <p>Is there a way to do something like that?</p>