在我们的自动化构建中,我开始出现相当奇怪的行为。我有一个非常简单的 Windows 服务 .msi(内置于 Visual Studio 2010),它在我们的中央构建/存储库服务器上编译,上传到我们的开发服务器,然后从构建/存储库服务器远程安装(命令行通过 ssh 使用 plink)在开发服务器上。
这已经工作了很长时间,直到最近自动化构建开始失败 100% 的时间。msi 的详细安装日志表明“已安装此产品的较新版本”。我远程进入开发服务器,检查了 msi,并且自己在服务器上手动安装它没有问题(通过命令行和 GUI)。然后我从“程序和功能”窗口中卸载了该服务,验证了文件和条目已被删除,再次尝试从构建服务器远程安装它,并再次得到完全相同的错误。该服务只是不会远程安装,因为它认为仍然安装了较新的服务(即使我已经卸载了它),但我可以自己手动完成。
编辑
添加一些日志文本。
Action start 15:47:16: AppSearch.
MSI (s) (B8:F0) [15:47:16:265]: Doing action: FindRelatedProducts
Action ended 15:47:16: AppSearch. Return value 1.
MSI (s) (B8:F0) [15:47:16:267]: Using cached product context: User non-assigned for product: BA4139E4B48F8264ABFF918A7B583A0B
MSI (s) (B8:F0) [15:47:16:267]: Using cached product context: User non-assigned for product: BA4139E4B48F8264ABFF918A7B583A0B
MSI (s) (B8:F0) [15:47:16:267]: Using cached product context: User non-assigned for product: BA4139E4B48F8264ABFF918A7B583A0B
MSI (s) (B8:F0) [15:47:16:267]: Using cached product context: User non-assigned for product: BA4139E4B48F8264ABFF918A7B583A0B
MSI (s) (B8:F0) [15:47:16:267]: Using cached product context: User non-assigned for product: BA4139E4B48F8264ABFF918A7B583A0B
MSI (s) (B8:F0) [15:47:16:267]: Using cached product context: User non-assigned for product: BA4139E4B48F8264ABFF918A7B583A0B
Action start 15:47:16: FindRelatedProducts.
MSI (s) (B8:F0) [15:47:16:267]: PROPERTY CHANGE: Adding NEWERPRODUCTFOUND property. Its value is '{4E9314AB-F84B-4628-BAFF-19A8B785A3B0}'.
MSI (s) (B8:F0) [15:47:16:268]: Doing action: ERRCA_CANCELNEWERVERSION
Action ended 15:47:16: FindRelatedProducts. Return value 1.
MSI (s) (B8:F0) [15:47:16:269]: Note: 1: 2235 2: 3: ExtendedType 4: SELECT `Action`,`Type`,`Source`,`Target`, NULL, `ExtendedType` FROM `CustomAction` WHERE `Action` = 'ERRCA_CANCELNEWERVERSION'
Action start 15:47:16: ERRCA_CANCELNEWERVERSION.
MSI (s) (B8:F0) [15:47:16:269]: Product: Product.Services -- Unable to install because a newer version of this product is already installed.
Unable to install because a newer version of this product is already installed.
Action ended 15:47:16: ERRCA_CANCELNEWERVERSION. Return value 3.
Action ended 15:47:16: INSTALL. Return value 3.