OctoPack在TFS Build中失败

时间:2014-07-13 01:01:40

标签: azure-devops octopus-deploy

我在Visual Studio 2013中使用Visual Studio Online。构建失败并带有

You are trying to build with OctoPack, but the NuGet targets file that OctoPack depends on is not available on this computer. This is probably because the OctoPack package has not been committed to source control, or NuGet Package Restore is not enabled

根据此链接https://octopusdeploy.com/blog/octopack-3.0我需要进行一些更改以使包恢复正常工作,但前一个链接中的另一个链接表示如果使用VS2013和Visual Studio Online Nuget.org则不需要任何配置

当我在VS中构建时,首先恢复所有软件包,然后构建项目。此外,如果我构建项目并通过命令行调用Octopack一切正常。想法?

3 个答案:

答案 0 :(得分:3)

如果您在构建之前运行NuGet Package Restore,这应该可行。但是,请确保项目文件中引用OctoPack.targets的路径是正确的 - 您可能已移动了packages文件夹或项目文件,并且相对路径不再匹配。解决问题的最简单方法是运行Update-Package -Reinstall Octopack

答案 1 :(得分:2)

最近更改了

NuGet Package Restore,因此您无需在解决方案中包含NuGet来执行包还原。但是,OctoPack在路径上仍然需要NuGet,因此它可以找到它。您可以尝试通过在调用OctoPack时添加此参数来明确指定NuGet的路径。

/p:OctoPackNuGetExePath=<path>\nuget.exe

答案 2 :(得分:2)

您只需要检查Octopack目标文件。

\包\ OctoPack.2.0.26 \目标\ OctoPack.targets