实体框架5在保存时停止运行T4模板文件(Entity Framework 5 stopped running T4 templates files on save)

编程入门 行业动态 更新时间:2024-10-18 16:47:07
实体框架5在保存时停止运行T4模板文件(Entity Framework 5 stopped running T4 templates files on save)

在工作中我们刚刚升级到Entity Framework 5.我们的EDMX文件现在还有一些其他节点:

EntityContainer.Context.tt

更新

在EDMX中,属性“保存时转换相关文本模板”设置为true,问题仍然存在。

At work we just upgraded to Entity Framework 5. Our EDMX file now has a couple other nodes beneath it:

EntityContainer.Context.tt

Update

In the EDMX the property "Transform Related Text Templates On Save" is set to true and the problem is still happening.

最满意答案

您的EDMX是否在项目的子文件夹中? 如果是这样,好消息是你没有做错任何事。 坏消息是这是一个已知的问题...查看我的博客文章。 http://thedatafarm.com/blog/data-access/watch-out-for-vs2012-edmx-code-generation-special-case/ 。

目前有两种解决方法:

1)将edmx移动到主项目文件夹中2)根据需要显式强制执行代码

Is your EDMX in a sub-folder of your project? If so, the good news is that you didn't do anything wrong. The bad news is that this is a known issue...check my blog post about it. http://thedatafarm.com/blog/data-access/watch-out-for-vs2012-edmx-code-generation-special-case/.

Two work arounds for the time being:

1) move the edmx into the main project folder 2) explicitly force the code gen as needed

更多推荐

EDMX,tt,模板,文件,电脑培训,计算机培训,IT培训"/> <meta name="description&quo

本文发布于:2023-08-07 01:31:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1458493.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:实体   框架   模板   文件   Entity

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!