I have an Entity Framework model with the Entity Objects T4 Template. For some reason, now every time I change the model (say the model name is Model.edmx and the template Model.tt), it used to update the Model.cs file, but now it’s creating Model1.cs and leaving Model.cs untouched.
Why is that? Where does it define the file to update or gen to?
Thanks.
This sometimes happens when there’s already a file named “Model.cs” in the output directory. Visual Studio then generates to another file named “Model1.cs”. The way to fix that is by unloading the project file (right click the project) and edit it (right click again). Look for something like this:
Replace “Model1.cs” with “Model.cs”
Reload project (right click)