Sql – Active Record and Linq T4 Templates problem

sqlitesubsonicsubsonic3

I've started a C# web application project using subsonic 3.0.3 as my DAL and SQLite for database.

It doesn't have any problem when using SimpleRepo, but the problem occurs when I try to use ActiveRecord/Linq T4 templates.

It says "Metadata file 'System.Data.SQLite' could not be found". The settings.ttinclude is the one provided with SQLite.ttinclude file and its config looks ok, and other files are instructed to use SQLite.ttinclude of course. I've also tested them with an SQL Server database and everything goes fine.

Also tried searching about it on the net and all I could find were these:

  1. Subsonic Google Groups which instructs me to add a reference to System.Data.SQLite to the top of settings.ttinclude. No luck.
  2. Someone at here commented about this issue, and it was answered to check the connection string, which doesn't seem to be my problem, because the app works when I use SimpleRepo.

Best Answer

Is SQLite installed on your machine? You need the .NET driver for it as well (that's what can't be found).