I have a library that defines a class
namespace ClassLibrary1
{
public class Class1
{
public static readonly int Rate = 5;
}
}
In the same lib I add a tt file
<#@ template debug="false" hostspecific="false" language="C#" #>
<#@ output extension=".cs" #>
<#@ import namespace="ClassLibrary1" #>
<#@ assembly name="ClassLibrary.dll" #>
enum MilkRate{ Walmart=<#= Class1.Rate #>}
I get error "Compiling transformation: Metadata file 'ClassLibrary.dll' could not be found d:\documents\visual studio 10\Projects\ConsoleApplication2\ClassLibrary1\TextTemplate1.tt"
how to solve this?
[Occurs on VS 2010, VS2008]