title: ASP.Net Core you must add reference to System.Runtime Version 4.1.0.0
body: <p>I'm having a bizarre issue.  I have a T4 Generator which is generating templates.
  Everything Generates fine until I try to reference <code>MyType.GetCustomAttributes&lt;MyAttributeAttribute&gt;(false).SingleOrDefault();</code></p>
  
  <p>Then I receive an error:</p>
  
  <blockquote>
    <p>Compiling transformation: The type 'Attribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. RestEzApiCore   </p>
  </blockquote>
  
  <p>This is definitely referenced, it seems to be a mismatch between framework types.</p>
  
  <p>I'm running on VS2017, maybe adding a runtime policy might help, but I don't know how to</p>
  
  <p>Does anyone know how to fix this issue?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Here are a list of things I've tried which have not worked:</p>
  
  <ol>
  <li>I've wiped my packages folder clean</li>
  <li>installing .Net-Framework 1.6 which has not helped me.</li>
  <li>Moving All the Runtime Code to a seperate DLL</li>
  <li>I deleted all project including the prior .net 4.5.2 and Upgraded them all to ASP.Net-Core</li>
  </ol>
  
  <p>None of these options have seemed to work</p>