title: T4 Templating with 3rd party assemblies
body: <p>I have the need to do JSON schema generation within a T4 template, and found Newtonsoft's new Schema class more than adequate for the purpose at hand (within a console application, tested), however, I cannot seem to make it play ball with the rest, as the instance to Newtonsoft always returns null.</p>
  
  <p>T4 declaration:</p>
  
  <pre><code>&lt;#@ template debug="true" hostspecific="true" language="C#" #&gt;
  &lt;#@ assembly name="System.Core" #&gt;
  &lt;#@ assembly name="Newtonsoft.Json.dll" #&gt;
  &lt;#@ assembly name="Newtonsoft.Json.Schema.dll" #&gt;
  &lt;#@ import namespace="System.Linq" #&gt;
  &lt;#@ import namespace="System.Text" #&gt;
  &lt;#@ import namespace="System.Collections.Generic" #&gt;
  &lt;#@ output extension=".cs" #&gt;
  </code></pre>
  
  <p>The assembly references point to the DLL files, and I have folder look ups set in the project settings for the project, screen shot below:</p>
  
  <p><img src="https://i.stack.imgur.com/RbIb0.png" alt="enter image description here"></p>
  
  <p>Trying to do something like the below, fails, because Newtonsoft cannot be found:</p>
  
  <p>var schema = Newtonsoft.Json.Schema.JSchema.Parse(jsoncontent);</p>
  
  <p>Error thrown is: <strong>Metadata file 'Newtonsoft.Json.Schema.dll" could not be found</strong>.</p>