Thursday, April 29, 2010

S#arp Arcitecture 1.5 - running T4 teplate error

I decided to build some project using S#arp Architecture. I am using VS 2010.

I went through all installation steps and created my first project S#arp Architecture Application.

My next step was running scaffolding generator. And then I got the troubles.

Any time I run custom tool, I get two error messages:

Compiling transformation: Metadata file 'Inflector.Net.dll' could not be found
Compiling transformation: Metadata file 'SharpArch.Core.dll' could not be found

I checked the references - they was set correctly. I was stuck but I didn't want to surrender, and after hours of googling and voodoo I got the solution.

The problem is solved by specifying the absolute path to the referenced assembly in template file (@assembly directive)

I found two files where Inflector.Net.dll and SharpArch.Core.dll are referenced:

[solution folder]\tools\CrudScaffolding\
[solution folder]\tools\CrudScaffolding\Templates\

and replaced following rows

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


<#@ assembly name="[solution folder]\lib\SharpArch.Core.dll" #>


<#@ assembly name="Inflector.Net.dll" #>


<#@ assembly name="[solution folder]\lib\Inflector.Net.dll" #>

No error anymore!


  1. I reported the issue:

  2. Fixed it and pushed out the new release. Thanks Igor.