创建引用 SubSonic 的 T4 模板文件
我正在尝试编写 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否尝试过将
.dll
放在程序集名称的末尾?(确保 SubSonic.Core.dll 位于同一目录中)。
有一篇关于 T4 汇编指令的文章可能对您有帮助:
Have you tried putting
.dll
at the end of the assembly name?(Make sure that SubSonic.Core.dll is in the same directory).
There is an article on the T4 Assembly directive that may help you: