I cant figure out how to include the resource file (.resx) in the (.tt) T4 template.
I tried so far... Importing the namespace
<#@ import names
There is an easier way to do this without compiling your project if you are using VS2010 SP1 and above, by using
<#@ assembly name="$(TargetPath)" #>
<#@ import namespace="Your.Namespace.Properties" #>
Copy the first line as it is, and in the second line use the namespace where the Resource file resides and access the resource strings normally as you would in c#
Resources.ResourceManager.GetString("SomeKey");
or
var key = Resources.SomeKey;
I learnt this from Use class inside a T4 template
Hope it helps somebody