【发布时间】:2011-08-26 15:09:40
【问题描述】:
我们有一个 VS2010 解决方案,其中包含一个 SQL CLR 项目,该项目本身具有对已在我们的开发数据库服务器上注册的第三方程序集的引用(通过解决方案中的数据库项目,该解决方案中有一个使用脚本来注册程序集从 varbinary 文字创建组件)。
当我们尝试通过 TFS 运行构建时,CLR 项目无法构建,因为它无法找到对程序集的引用(下面的错误消息)
ResolveSQLCLRReferences:
Primary reference "Telerik_Web_UI_RecurrenceEngine".
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\TeamData\Microsoft.Data.Schema.SqlClr.targets(147,7): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Telerik_Web_UI_RecurrenceEngine". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [..]
For SearchPath "xx\obj\sqlclr".
Considered "xx\obj\sqlclr\Telerik_Web_UI_RecurrenceEngine.dll", but it didn't exist.
Considered "xx\obj\sqlclr\Telerik_Web_UI_RecurrenceEngine.exe", but it didn't exist.
ResolveAssemblyReferences:
Ignoring "Telerik_Web_UI_RecurrenceEngine" because it has a non-empty subtype "SQLCLR".
通过 VS 构建/部署时很好。我注意到我在本地的 obj\sqlcr 文件夹中有所需的 DLL 文件,我假设它是从项目引用到 SQL Server 上的程序集生成的。
我们是否需要签入此文件以便构建服务器可以找到它,或者是否有某种方法可以让 msbuild 连接到数据库服务器以解析引用?
或者我们应该从 DB 项目中的文件(而不是 varbinary 文字)注册程序集,然后让 CLR 项目引用它? (不确定如何手动复制到 \obj\sqclr 文件夹?)。任何指导表示赞赏!
【问题讨论】:
标签: visual-studio-2010 tfs msbuild sqlclr