Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I resolve this error: Loading the include file 'EF.Utility.CS.ttinclude' returned a null or empty string

How can I resolve these errors:

  1. Loading the include file 'EF.Utility.CS.ttinclude' returned a null or empty string.
  2. Value does not fall within the expected range.

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

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. Loading the include file 'EF.Utility.CS.ttinclude' returned a null or empty string. The transformation will not be run. C:\Projects\NSAForms\NSAForms\NSAFormsEDM\NSAFormsEntities.tt
  2. Failed to resolve include text for file: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?

Thanks in advance,

Arnold

like image 751
Arnold Avatar asked Feb 21 '13 10:02

Arnold


3 Answers

I had very similar issue and I tried with VS2012 and VS2013.

After reinstalling Entity Framework 6 Tools for Visual Studio 2012 http://www.microsoft.com/en-us/download/confirmation.aspx?id=40762 every thing went back to normal.

like image 136
odesuk Avatar answered Oct 20 '22 10:10

odesuk


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.

like image 28
bricelam Avatar answered Oct 20 '22 12:10

bricelam


Reinstalling Entity Framework 6 Tools for Visual Studio 2012 http://www.microsoft.com/en-us/download/confirmation.aspx?id=40762 work for me

like image 5
Alexandre Avatar answered Oct 20 '22 11:10

Alexandre