title: IgnoreAccessChecksToAttribute does not grant access to internal types in referenced project
body: <p>In my net5 project I have <code>.cs</code> file with <code>IgnoresAccessChecksToAttribute</code></p>
  <pre class="lang-cs prettyprint-override"><code>[assembly: IgnoresAccessChecksTo(&quot;MyOtherProject&quot;)]
  
  namespace System.Runtime.CompilerServices
  {
      [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
      public sealed class IgnoresAccessChecksToAttribute : Attribute
      {
          public IgnoresAccessChecksToAttribute(string assemblyName)
          {
              AssemblyName = assemblyName;
          }
  
          public string AssemblyName { get; }
      }
  }
  </code></pre>
  <p>Also in my solution there is &quot;MyOtherProject&quot;, which has some internal types. It is referenced via ProjectReference:</p>
  <pre><code>&lt;ProjectReference Include=&quot;..\..\src\MyOtherProject\MyOtherProject.csproj&quot; /&gt;
  </code></pre>
  <p>When I try to use one of these internal types I am getting error</p>
  <pre><code>'Type' is inaccessible due to its protection level
  </code></pre>
  <p>Am I doing something wrong?</p>