tags:

views:

112

answers:

3

I followed the 3 step procedure 20 times on 3 different sytems under all possible conditions and no matter what i do it won't generate the classes. I keep getting the following error.

Loading the include file 'SQLServer.ttinclude' returned a null or empty string. The transformation will not be run.

ANY Idea's?

Frustrated!!!!!!!!!!!!!!

A: 

Make sure your tables have primary keys.

DaveHogan
A: 

I have tried all the solution I found on google but no luck. So I decided to dig into this issue. As you can see, the error tell that generator can not load the include file "SQLServer.ttinclude" although the include file exists. If it can not read include file, why don't we include content of SQLServer.ttinclude instead of including file ?

Copy content of SQLServer.ttinclude to all *.tt as below steps:

  1. Make sure that you have follow this instruction on Subsonic homepage first [link text][1]

    [1]: http://subsonicproject.com/docs/Using_ActiveRecord

  2. For each .tt file:

    • Delete <#@ include file="SQLServer.ttinclude" #>
    • Copy and paste content of SQLServer.ttinclude to the end of .tt files
  3. Right click on .tt files -> Run custom tool. The *.cs files will be generated. Compile now !!!!

A little funny thing that I've noticed: After doing above steps and get *.cs file generated. You can simply copy and paste template files again into your solution explorer exact the instruction in [link text][1] and the *.cs file generated without doing any tricks !!!

Hope this helps.

Hai

Hai Vu
A: 

Check the rights associated with the credentials used to authenticate access to the database. You need dbo access for the entity classes to be generated.