I am using an existing T4 Template that I last used about 6 months ago and I'm not aware of anything having changed. However I am not getting the following exception, when I save the template file:
Errors were generated when initializing the transformation object. The transformation will not be run. The following Exception was thrown: System.IO.FileNotFoundException: Could not load file or assembly 'T4Toolbox, Version=11.0.0.0, Culture=neutral, PublicKeyToken=dc4a538672a7b38f' or one of its dependencies. The system cannot find the file specified. File name: 'T4Toolbox, Version=11.0.0.0, Culture=neutral, PublicKeyToken=dc4a538672a7b38f'
Server stack trace: at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) ...
The header for my tt file is:
<#@ template language="C#" debug="True" #>
<#@ output extension="cs" #>
<#@ include file="T4Toolbox.tt" #>
<#@ assembly name="System.Core" #>
<#@ import namespace="System.IO" #>
<#@ assembly name="System.Xml"#>
<#@ assembly name="System.Linq"#>
<#@ assembly name="$(TargetPath)" #>
<#@ import namespace="System.Xml" #>
<#@ import namespace="System.Diagnostics" #>
<#@ import namespace="System.Linq" #>
<#@ import namespace="System.Collections.ObjectModel" #>
<#@ import namespace="MyNamespace" #>
<#@ parameter name="className" type="System.String" #>
I have checked Tools > Extension and Updates and I have Version 11.8.0.0 installed.
Is there anything else I can check?