创建引用 SubSonic 的 T4 模板文件

发布于 2024-09-12 13:57:57 字数 445 浏览 0 评论 0原文

我正在尝试编写 T4 模板来为 SubSonic 3 创建的类创建包装类(实现 IActiveRecord)。但是,当我编译模板时,出现以下错误:

Compiling transformation: Metadata file 'SubSonic.Core' could not be found

我在设置文件中包含 SubSonic.Core。 <#@ assembly name="SubSonic.Core" #> 然后导入命名空间,例如 <#@ import namespace="SubSonic.Schema"#><#@ import namespace="SubSonic"#>

我做错了什么?我需要将 SubSonic.Core.dll 放入 GAC 中吗?

I am trying to write T4 template to create wrapper classes for classes created by SubSonic 3 (implementing IActiveRecord). But when I compile my template I get following error:

Compiling transformation: Metadata file 'SubSonic.Core' could not be found

I'm including SubSonic.Core in my settings file. <#@ assembly name="SubSonic.Core" #> and then importing the namespaces like <#@ import namespace="SubSonic.Schema"#> and <#@ import namespace="SubSonic"#>

What I'm doing wrong? Do I need to put SubSonic.Core.dll into GAC?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

后来的我们 2024-09-19 13:57:57

您是否尝试过将 .dll 放在程序集名称的末尾?

<#@ assembly name="SubSonic.Core.dll" #>

(确保 SubSonic.Core.dll 位于同一目录中)。

有一篇关于 T4 汇编指令的文章可能对您有帮助:

http://www.olegsych.com/2008/02/t4-assembly-directive/

Have you tried putting .dll at the end of the assembly name?

<#@ assembly name="SubSonic.Core.dll" #>

(Make sure that SubSonic.Core.dll is in the same directory).

There is an article on the T4 Assembly directive that may help you:

http://www.olegsych.com/2008/02/t4-assembly-directive/
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文