Visual Studio 2012 - Can't move EF .tt files

前端 未结 3 1739
时光说笑
时光说笑 2021-02-02 16:35

I noticed in VS2012 that when you make a new EF Model (.edmx) that the DbContext is the default code generation and the .tt (T4 template) files are now nested underneath

3条回答
  •  忘掉有多难
    2021-02-02 16:38

    It is some strange new feature where templates are added as dependency to EDMX file. You can fix it by editing .csproj file for your project (you can do it in notepad or unload project in VS and edit it). You will find something like this:

    
      TextTemplatingFileGenerator
      Model.edmx
      Model.cs
    
    

    You just need to remove DependentUpon element and the template item will become independent part of the project.

提交回复
热议问题