Reputation: 63845
I'm having all sorts of hell getting Visual Studio 2010 to compile my T4 template. I am pretty sure this same template worked on 2008, but I can't confirm right now. I know for sure it works on MonoDevelop.
Anyway, here is the header of my template:
<#@ template language="C#v3.5" hostspecific="true" #>
<#@ output extension="cs" #>
<#@ assembly name=“System.Core” #>
<#@ import namespace="System.IO" #>
<#@ import namespace="System.Text" #>
<#@ import namespace="System.Collections.Generic" #>
<#@ import namespace="System" #>
<#@ import namespace="System.Linq" #>
Visual Studio 2010 complains abut the first line, the template directive:
A directive was specified in the wrong format. The transformation will not be run. Please specify the directive in the format <#@ name [parameterName="parameterValue"]* #>
Why is this not working as expected?
Upvotes: 4
Views: 781
Reputation: 63845
My problem was that I copy and pasted the assembly
directive and it used “”
instead of ""
Also, I figured out that the line number it gives as the error is basically pointless.
Upvotes: 5