我正在为 VS 2010/SQL Server 2005 中的 SQL CLR 项目执行 msbuild(持续集成)。该项目在 VS 中正确构建,但我无法在 msbuild 中构建它,因为它需要第 3 方外部参考。
解决此问题的典型方法是添加一个库文件夹并将引用指向该库文件夹。我如何在 SQL CLR 项目中做到这一点?
我得到的构建错误是:
[19:38:42]CorrSqlServerCompo\PowerStatRegression.csproj.teamcity: Build target: Build
[19:38:42][CorrSqlServerCompo\PowerStatRegression.csproj.teamcity] CoreCompile
[19:38:42][CoreCompile] Csc
[19:38:42][Csc] matrix\MatrixHandler.cs(5, 7): error CS0246: The type or namespace name 'Extreme' could not be found (are you missing a using directive or an assembly reference?)
[19:38:42][Csc] matrix\MatrixHandler.cs(6, 7): error CS0246: The type or namespace name 'Extreme' could not be found (are you missing a using directive or an assembly reference?)
[19:38:42][Csc] matrix\MatrixHandler.cs(216, 51): error CS0246: The type or namespace name 'GeneralMatrix' could not be found (are you missing a using directive or an assembly reference?)
[19:38:42][CorrSqlServerCompo\PowerStatRegression.csproj.teamcity] Project CorrSqlServerCompo\PowerStatRegression.csproj.teamcity failed.
构建项目文件中的 itemgroup 为:
<ItemGroup>
<Reference Include="Extreme.Numerics.Net20, Version=3.6.10055.0, Culture=neutral, PublicKeyToken=9e513770f58567b2, processorArchitecture=MSIL">
<SubType>SQLCLR</SubType>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.XML" />