我正在使用 Jenkins 和 Ant 在我们的构建机器上构建一个 VSTO 项目。昨天还好好的,今天又报错了:
[exec] Project "C:\Program Files (x86)\Jenkins\jobs\ProjectDir\workspace\ProjectDir\MyProject\MyProject.csproj" on node 1 (Rebuild target(s)).
[exec] C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\OfficeTools\Microsoft.VisualStudio.Tools.Office.targets(668,9): error MSB4018: The "SetInclusionListEntry" task failed unexpectedly. [C:\Program Files (x86)\Jenkins\jobs\ProjectDir\workspace\ProjectDir\MyProject\MyProject.csproj]
[exec] C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\OfficeTools\Microsoft.VisualStudio.Tools.Office.targets(668,9): error MSB4018: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Tools.Office.Runtime, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. [C:\Program Files (x86)\Jenkins\jobs\ProjectDir\workspace\ProjectDir\MyProject\MyProject.csproj]
我将代码恢复到最后一个已知的工作提交。该代码在我的本地开发机器上构建良好。
关于构建机器上可能发生的变化导致这种情况的任何想法?