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

前端 未结 3 1679
时光说笑
时光说笑 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:49

    I'm using EF5.x a DBContext in a separate project to the EF data model. Despite removing the DependentUpon entry in the project file as stated by Ladislav and here the classes were still appearing under my Model1.tt file.

    To get round this, I had to also remove part of the entries from the project file for each of the tables:

    
      Model1.tt
    
    

    Only lines with the tags should be removed whilst the tags should be kept. Removing the whole entry will cause the file to disappear from the project list. The entries can be shortened to for brevity.

提交回复
热议问题