如何在VS2015中更改代码生成策略?

时间:2016-12-19 04:59:31

标签: c# asp.net entity-framework entity-framework-6

我正在使用VS2015并遇到以下错误,在我的属性窗口中没有看到Code Generation Strategy这样的属性,如屏幕截图所示,我该如何找到这个属性?

// T4 code generation is enabled for model 'C:\Users\username\documents\visual studio 2015\Projects\EFdemo\EFdemo\EmployeeModel.edmx'. 
// To enable legacy code generation, change the value of the 'Code Generation Strategy' designer
// property to 'Legacy ObjectContext'. This property is available in the Properties Window when the model
// is open in the designer

enter image description here

1 个答案:

答案 0 :(得分:0)

  1. 打开您的设计师(xxxxx.edmx)
  2. 点击设计师的背景
  3. 请参见“属性”窗口。你会在这里找到它
  4. enter image description here