16

I am using EF5 in VS2012, database first method.

When I add a new table X to the design surface, the table shows, then I save and compile without error. However, no class X is ever generated (under MyModel.tt in solution explorer).

If I right click MyModel.tt and choose "Run Custom Tool", then the classes are generated.

This behavior is different than what I experienced in EF4 and VS 2010, where the classes are automatically generated.

  1. Can I change this behavior so that the table classes are automatically generated?
  2. Why aren't the classes for tables generating automatically?
1
  • FYI there is an update to VS 2012 that fixes this bug. Commented Nov 27, 2012 at 6:01

2 Answers 2

21

This is a bug in VS2012. More details here: http://entityframework.codeplex.com/workitem/453

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks. A couple extra clicks won't kill me.
3

This was fixed in the VS 2012 Update 1 that was shipped today. You can get it from: http://www.microsoft.com/visualstudio/eng/downloads#d-visual-studio-2012-update

1 Comment

This is great answer.Delete your model completely and add new data model.So the files will create again files and fixed.Do not just delete tables in model diagram.Delete model file and any nested files

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.