How to reference .Net standard in T4 file? : <p>I have a .Net standard 2.0 library. In this library I have a T4 file. The file contains these rows.</p>

<pre><code>&lt;#
            foreach (MessageType enumValue in Enum.GetValues(typeof(MessageType)))
            {
                var name = Enum.GetName(typeof(MessageType), enumValue);
#&gt;
</code></pre>

<p>I get the following error in Visual Studio. </p>

<blockquote>
  <p>Compiling transformation: The type 'Enum' is defined in an assembly
  that is not referenced. You must add a reference to assembly
  'netstandard, Version=2.0.0.0, Culture=neutral,
  PublicKeyToken=cc7b13ffcd2ddd51'.</p>
</blockquote>

<p>How can I add a reference to 'netstandard'?</p>
