In Visual Web Developer Express 2008 the SubSonic ASP.NET MVC template doesn't seem to work with a new database I added. I removed the Chinook Database and created my own one. I understand the the .tt files in the Models folder are used to generate code, but they don't (despite changing the ConnectionStringName to what I set in the web.config)
Right clicking on each .tt file and selecting 'Run Custom Tool' does not generate anything, except an error message:
Cannot find custom tool 'TextTemplatingFileGenerator' on this system.
Where is that tool kept? There are .tt files in CodeTemplates, which are used when you create a new controller or view, so I assume there is a tool that does this.
Best Answer
Following along with Adam's comment, YOU CAN do this in VS Express, but there are changes required to the template as Adam suggested.
The Visual Studio requirement is only used to get the path to the active project, which is then used to find a web.config file and the app_data path. Since those values are generally known within a project, we can hardcode substitutes values
Update the _Settings.tt file like so:
Then use the VS External Tools feature to set up a T4 tool (Tools->External Tools): Set these properties:
Click Ok and then execute the newly created tool from the Tools->External Tools menu.