title: IDE0044 (Make field readonly) depending on target framework?
body: <p>Consider this code:</p>
  
  <pre><code>class C
  {
      private readonly CancellationTokenRegistration _ctr;
      public C(CancellationToken t) =&gt; _ctr = t.Register(...);
      private void Bla() =&gt; _ctr.Dispose();
  }
  </code></pre>
  
  <p>Resharper warns (correctly, I think?) about a "possibly impure struct method called on readonly variable: struct value always copied before invocation".</p>
  
  <p>But when <code>readonly</code> is removed from the declaration, the compiler may or may not emit a "IDE0044: Make field read only" message. Interestingly, it does so if .NET Standard 2.1 is targeted, but not if 2.0 (didn't check other targets).</p>
  
  <p>Assuming <code>Dispose()</code> <em>is</em> impure (it might release the internal reference to the <code>CancellationTokenSource</code> and/or the callback), then I'd prefer it to be called on the field rather than a copy thereof, so no <code>readonly</code>.</p>
  
  <p>Either way I have to suppress some message/warning, which is annoying.</p>
  
  <p>Question: can anybody explain why the C# compiler does or doesn't emit the IDE0044 message depending on the target framework? Was there a fundamental change in the rules when/if methods of <code>readonly</code> structs are called on a copy?</p>