开发者

Transforming TT files in MsBuild

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\G开发者_运维知识库eneratedCode\Dsl\ToolboxHelper.tt. Line=-1, Column=-1 Dsl

but the location of the actual TT file is

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


This was answered for me on MSDN:

Transforming TT files in MsBuild


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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜