2011-05-16 33 views
1

我们有一个VS2010解决方案,其中包含一个SQL CLR项目,该项目本身具有对已在我们的开发数据库服务器上注册的第三方程序集的引用(通过该解决方案中的数据库项目有一个脚本,用于使用来自varbinary文字的CREATE ASSEMBLY注册程序集)。使用TFS的SQL CLR项目构建失败 - 无法解析对程序集的引用

当我们尝试通过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连接到数据库服务器以解析引用?

或者我们应该从数据库项目(而不是varbinary文字)中的文件注册程序集,然后获取CLR项目来引用它? (不知道如何,手动复制到\ obj \ sqclr文件夹可能?)。任何指导赞赏!

回答

0

检入其他项目文件中的文件可以替代,但您必须确保在Team Build服务器上也可以找到文件引用。

由于这是第三部分库dll,我相信它不会经常更改,因此将dll放入Team Build服务器的GAC中也可能有效。 (...并且是更清洁的解决方案。)

相关问题