TeamCity 编译错误
TeamCity compilation error
我在使用 Teamcity 时遇到问题。
运行 我在 Visual Studio 中的项目构建成功通过,运行 Teamcity 中的 "build" 导致一些难以理解的错误。
这些是我从 TeamCity 得到的错误:
AppealPersonDetails.cs(29, 7): error CS0246: The type or namespace name 'Tlv' could not be found (are you missing a using directive or an assembly reference?)
AppealPersonDetails.cs(32, 7): error CS0246: The type or namespace name 'Excel' could not be found (are you missing a using directive or an assembly reference?)
AppealReportAddAnotherApplication.cs(29, 7): error CS0246: The type or namespace name 'Tlv' could not be found (are you missing a using directive or an assembly reference?)
AppealReportDetailsPage.cs(29, 7): error CS0246: The type or namespace name 'Tlv' could not be found (are you missing a using directive or an assembly reference?)
FinishProcessPage.cs(29, 7): error CS0246: The type or namespace name 'Tlv' could not be found (are you missing a using directive or an assembly reference?)
MainStatusPage.cs(29, 7): error CS0246: The type or namespace name 'Tlv' could not be found (are you missing a using directive or an assembly reference?)
MainTestRunner.cs(27, 7): error CS0246: The type or namespace name 'Tlv' could not be found (are you missing a using directive or an assembly reference?)
MainTestRunner.cs(31, 7): error CS0246: The type or namespace name 'Excel' could not be found (are you missing a using directive or an assembly reference?)
Queries.cs(13, 7): error CS0246: The type or namespace name 'Tlv' could not be found (are you missing a using directive or an assembly reference?)
StatusApplicationsPage.cs(29, 7): error CS0246: The type or namespace name 'Tlv' could not be found (are you missing a using directive or an assembly reference?)
StatusPage.cs(29, 7): error CS0246: The type or namespace name 'Tlv' could not be found (are you missing a using directive or an assembly reference?)
您计算机上 GAC 中的任何第三方依赖项都需要在 GAC 中或在您的构建服务器上本地定位。
我会检查包含 Tlv
和 Excel
命名空间的程序集的位置,然后从那里开始。如果 Excel
命名空间是由于依赖于 Office 互操作程序集,您将需要在构建服务器上安装正确版本的 Excel。
根据评论编辑:
OP 澄清说他直接使用了对程序集的引用,而不是项目引用。当他切换到使用项目引用时,构建顺序已正确建立,他的问题已解决。
我在使用 Teamcity 时遇到问题。 运行 我在 Visual Studio 中的项目构建成功通过,运行 Teamcity 中的 "build" 导致一些难以理解的错误。
这些是我从 TeamCity 得到的错误:
AppealPersonDetails.cs(29, 7): error CS0246: The type or namespace name 'Tlv' could not be found (are you missing a using directive or an assembly reference?)
AppealPersonDetails.cs(32, 7): error CS0246: The type or namespace name 'Excel' could not be found (are you missing a using directive or an assembly reference?)
AppealReportAddAnotherApplication.cs(29, 7): error CS0246: The type or namespace name 'Tlv' could not be found (are you missing a using directive or an assembly reference?)
AppealReportDetailsPage.cs(29, 7): error CS0246: The type or namespace name 'Tlv' could not be found (are you missing a using directive or an assembly reference?)
FinishProcessPage.cs(29, 7): error CS0246: The type or namespace name 'Tlv' could not be found (are you missing a using directive or an assembly reference?)
MainStatusPage.cs(29, 7): error CS0246: The type or namespace name 'Tlv' could not be found (are you missing a using directive or an assembly reference?)
MainTestRunner.cs(27, 7): error CS0246: The type or namespace name 'Tlv' could not be found (are you missing a using directive or an assembly reference?)
MainTestRunner.cs(31, 7): error CS0246: The type or namespace name 'Excel' could not be found (are you missing a using directive or an assembly reference?)
Queries.cs(13, 7): error CS0246: The type or namespace name 'Tlv' could not be found (are you missing a using directive or an assembly reference?)
StatusApplicationsPage.cs(29, 7): error CS0246: The type or namespace name 'Tlv' could not be found (are you missing a using directive or an assembly reference?)
StatusPage.cs(29, 7): error CS0246: The type or namespace name 'Tlv' could not be found (are you missing a using directive or an assembly reference?)
您计算机上 GAC 中的任何第三方依赖项都需要在 GAC 中或在您的构建服务器上本地定位。
我会检查包含 Tlv
和 Excel
命名空间的程序集的位置,然后从那里开始。如果 Excel
命名空间是由于依赖于 Office 互操作程序集,您将需要在构建服务器上安装正确版本的 Excel。
根据评论编辑:
OP 澄清说他直接使用了对程序集的引用,而不是项目引用。当他切换到使用项目引用时,构建顺序已正确建立,他的问题已解决。