MVC中创建自定义视图的t4模板

具体做法:

  根据MVC的版本 在“工具>>NuGet包管理器>>程序包管理控制台”中输入:

  MVC3:install-package mvc3codetemplatescsharp
  MVC4:install-package mvc4codetemplatescsharp
  MVC5:install-package mvc5codetemplatescsharp

安装时注意针对的项目。(下面的默认项目)

猜你喜欢

转载自www.cnblogs.com/epsoft/p/8963040.html