Mono refuses to resolve relative paths in T4 template includes

空扰寡人 提交于 2019-12-13 05:26:13

问题


Ok so I'm trying to hack together something to make SubSonic3 work with Postgres, on Mono.

I almost have the templates generating but have ran into one small problem.

<#@ include file="PostgreSQL.ttinclude" #>

will give a "cannot resolve include file" error.

However, specifying a full path will work(though cumbersome)

<#@ include file="/home/earlz/Projects/SubSonicPostgres/SubSonicPostgres/SubSonic/PostgreSQL.ttinclude" #>

Is there any kind of fix to this issue? Is it even a known bug?


回答1:


This is the first I've heard about it, and I wrote the MonoDevelop T4 engine :)

There's no trivial workaround, though since full source to MonoDevelop is available, you could easily patch it. Presumably the problem is that since the T4 engine is running inside the MD process, its working directory is MD's working directory. However, the host could easily override LoadIncludeText or ResolvePath to simulate a different working directory.

This really isn't the right place to report bugs - you're lucky I saw your post. You should ask on the MonoDevelop mailing list, and file bugs in the appropriate place.



来源:https://stackoverflow.com/questions/3384703/mono-refuses-to-resolve-relative-paths-in-t4-template-includes

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!