CTE type or namespace name 'Template' could not be found

Aug 5, 2009 at 11:39 AM
Edited Aug 5, 2009 at 12:31 PM

Please help.

What does this mean?

Error 1 Compiling transformation: The type or namespace name 'Template' could not be found (are you missing a using directive or an assembly reference?) c:\Code\Team\Cle\Cle.BusinessLayer\BusinessEntities\Generator1.tt 6 27

I am also getting this...

Error 2 Compiling transformation: The type or namespace name 'Template' could not be found (are you missing a using directive or an assembly reference?) c:\Code\Team\Cle\Cle.BusinessLayer\BusinessEntities\Template1.tt 6 26

Aug 5, 2009 at 12:25 PM
Edited Aug 5, 2009 at 12:38 PM

All --

FYI, I found the answer here...

http://www.olegsych.com/2008/09/t4-tutorial-creating-reusable-code-generation-templates/

...where the CTE error text that was search for was in an image, not on the page text, so my "find on page" did not work...

...oh well, here is the gist of the answer inline, just in case that link above dies, quoting here from Oleg Sych's very helpful work on the matter...

"In the mean time, note that Visual Studio displays errors when trying to process this file"

"Select [YOUR_TEMPLATE_NAME].tt in the solution explorer and change Custom Tool property from TextTemplatingFileGenerator to an empty value"

"TextTemplatingFileGenerator is a custom tool that invokes the code generation Engine to run or transform the code generation file. Clearing the Custom Tool property of the code generation file prevents Visual Studio from trying to process the file and displaying the unnecessary error"

(BTW, T4 is really great and I am just ashamed that I discoved it yesterday. Ug. I am SO far behind.)

Thank you.

-- Mark Kamoski

Aug 5, 2009 at 12:27 PM
Edited Aug 5, 2009 at 12:37 PM
mkamoski wrote:

...where the CTE error text that was search for was in an image, not on the page text, so my "find on page" did not work...

-- Mark Kamoski

Sheesh, www.Bing.com and www.Google.com and IE and FF, (et al)-- when are you going to start auto-OCR'ing images and indexing THAT text?

Keep up with Star Trek puh-leeezze.

:-)

(This sort of thing reminds me that the machine has a LONG way to go-- or rather, we have A LOT to teach the machine yet.)