【发布时间】:2010-09-05 17:57:17
【问题描述】:
我正在使用 Subsonic 3 生成 DAL。此外,我正在使用 T4 模板从 DAL 生成我的 BO。 Subsonic 的 T4 模板工作正常,但是当我运行我的模板时出现以下错误:
Compiling transformation: Metadata file 'SubSonic.Core.dll' could not be found
我在settings.include 文件中导入了 SubSonic,如下所示:
<#@ assembly name="SubSonic.Core.dll" #>
我指的是SubSonic.Core 项目(我已经下载了代码)。 GAC 中没有安装 SubSonic,但 DAL 项目正在生成代码,只是这样的文件。
编辑 1:- 如果我删除 <#@ assembly name="SubSonic.Core.dll" #> 它会出现新的错误:
Compiling transformation: The type or namespace name 'SubSonic' could not be
found (are you missing a using directive or an assembly reference?)
编辑2:-我已经通过添加<#@ assembly name="SubSonic.Core.dll" #> 来解决这个问题,正如我在回答我的this 问题时所建议的那样,但那是在VS 2008 中。不知道为什么这在VS 2010 中不起作用。
编辑 3:- 将 SubSonic.Core.dll 安装到 GAC,重新启动 VS,仍然出现该死的错误。应该睡吧。
【问题讨论】:
-
@Henk 有一个链接指向我得到第一个解决方案的问题。
-
它实际上说的是“SubSonc.Core.dll”,还是“SubSonic.Core.dll”?
标签: c# visual-studio-2010 subsonic3 t4