tags:

views:

16

answers:

1

I am trying to write T4 template to create wrapper classes for classes created by SubSonic 3 (implementing IActiveRecord). But when I compile my template I get following error:

Compiling transformation: Metadata file 'SubSonic.Core' could not be found

I'm including SubSonic.Core in my settings file. <#@ assembly name="SubSonic.Core" #> and then importing the namespaces like <#@ import namespace="SubSonic.Schema"#> and <#@ import namespace="SubSonic"#>

What I'm doing wrong? Do I need to put SubSonic.Core.dll into GAC?

+1  A: 

Have you tried putting .dll at the end of the assembly name?

<#@ assembly name="SubSonic.Core.dll" #>

(Make sure that SubSonic.Core.dll is in the same directory).

There is an article on the T4 Assembly directive that may help you:

http://www.olegsych.com/2008/02/t4-assembly-directive/
Kragen
thanks @kragen I'd also figured it from same page :DOleg is fantastic!!
TheVillageIdiot