3

I need to build a DSL Solution using MsBuild and want to be able to transform the TT files, I have tried the guide on http://msdn.microsoft.com/en-us/library/ee847423(VS.100).aspx but I am getting the following errors:

Failed to resolve include text for file:{0}

and also

Loading the include file '{0}' returned a null or empty string.

There is a page on MSDN which has these issues and there resolutions : http://msdn.microsoft.com/en-us/library/bb126242(VS.100).aspx but don't really give me enough information to resolve the issue.

One thing to note in the error it has the following path:

Error 72 Failed to resolve include text for file:C:\source\XXXXXXXX\Dsl\GeneratedCode\Dsl\ToolboxHelper.tt. Line=-1, Column=-1 Dsl

but the location of the actual TT file is

C:\source\XXXXXXXX\Dsl\GeneratedCode\ToolboxHelper.tt

Phill Duffy
  • 2,805
  • 3
  • 33
  • 45
  • Cross-posted from MSDN forum: http://social.msdn.microsoft.com/Forums/en-GB/dslvsarchx/thread/088f07a5-bd4d-42cf-9918-b6b06ef6a0d7 – Oleg Sych Apr 12 '10 at 00:11

3 Answers3

3

This was answered for me on MSDN:

Transforming TT files in MsBuild

Phill Duffy
  • 2,805
  • 3
  • 33
  • 45
1

For me, this was fixed by installing the "T4 Toolbox for Visual Studio 2015" extension. Apparently I only had the T4 editor installed.

mbomb007
  • 3,788
  • 3
  • 39
  • 68
0

Historically the story between T4 and MSBuild has been bad. Now with VS 2010 they are introducing Preprocessed templates. If you are using VS 2010 you should take a look at using those.

Sayed Ibrahim Hashimi
  • 43,864
  • 17
  • 144
  • 178
  • Sayed, Preprocessed templates are indeed a great new feature in VS2010, but they're orthogonal to MsBuild transformation - you can do msbuild of preprocessed or regular templates. – GarethJ Nov 08 '10 at 18:32