Reputation: 753
I am using Visual Studio Express 2012 for Web.
I have created a new empty web site using .net framework 4.
I am using SQL Server 2008 R2 Service Pack 2, and I have a database with 4 tables there.
When I try to add a new ADO.NET data model into my website from this database, the Model.edmx, Model.tt, and Model.Context.tt files are all generated, but my Model.cs and Model.Context.cs files are missing. If I try to use the option 'update the model from database' nothing happens.
I have installed Visual Studio just two days ago, and initially I could work with a successfully generated model for another web site. But now I cannot generate the model in any website. I have tried with other databases, to no success.
Upvotes: 3
Views: 1530
Reputation: 753
Thanks to John Saunders for providing this answer as a comment.
Use the Build->Transform T4 Templates command if present, otherwise, right click the .tt files and do Run Custom Tool
Upvotes: 4