本文介绍了如何解决此错误:加载包含文件'EF.Utility.CS.ttinclude'返回的字符串为空或空的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何解决这些错误:

  1. 加载包含文件'EF.Utility.CS.ttinclude'返回的字符串为空或空.
  2. 值不在预期范围内.

使用的工具:VS 2012,Entity Framework 5.0.0,T4MVCExtensions 3.5.0,.NET Framework 4.5

Tools Used: VS 2012, Entity Framework 5.0.0, T4MVCExtensions 3.5.0, .NET Framework 4.5

我在大型MVC解决方案中的项目中一直使用EF和T4模板,没有发生任何意外.现在,当我右键单击edmx图表时,EF会显示以下消息:值不在预期范围内.当我编译EF项目时,它会显示以下消息:

I've been using EF and T4 templates in a project within a large MVC solution without incident. Now, when I right-click on the edmx diagram, EF responds with the message: Value does not fall within the expected range. When I compile the EF project it responds with these messages:

  1. 加载包含文件'EF.Utility.CS.ttinclude'返回空字符串或空字符串.转换将不会运行. C:\ Projects \ NSAForms \ NSAForms \ NSAFormsEDM \ NSAFormsEntities.tt
  2. 无法解析文件的包含文本:C:\ Projects \ NSAForms \ NSAForms \ NSAFormsEDM \ EF.Utility.CS.ttinclude C:\ Projects \ NSAForms \ NSAForms \ NSAFormsEDM \ NSAFormsEntities.tt

数据库中的每个表都有一个主键.我为这个问题突然出现感到震惊.有人对如何解决此问题有建议吗?

Every table in the database has a primary key. I'm struck by how suddenly this issue appeared. Does anyone have some suggestions how to resolve this issue?

预先感谢

阿诺德

推荐答案

在VS 2012中,仅当 Microsoft Web开发人员工具安装 EF.Utility.CS.ttinclude 文件 Microsoft SQL Server数据工具组件被选中.

In VS 2012, the EF.Utility.CS.ttinclude file will only be installed if the Microsoft Web Developer Tools or Microsoft SQL Server Data Tools component is selected.

这篇关于如何解决此错误:加载包含文件'EF.Utility.CS.ttinclude'返回的字符串为空或空的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-29 15:56