AppHarbor无法恢复包裹

时间:2012-11-21 08:58:38

标签: appharbor

我正在将NancyFx解决方案推向AppHarbor,但由于AppHarbor没有恢复软件包,因此无法构建。

包恢复在我的解决方案文件中定义。

Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{313EB245-8733-45FC-82B3-6C1404446A50}"
ProjectSection(SolutionItems) = preProject
    .nuget\NuGet.Config = .nuget\NuGet.Config
    .nuget\NuGet.exe = .nuget\NuGet.exe
    .nuget\NuGet.targets = .nuget\NuGet.targets
EndProjectSection
EndProject

以下是AppHarbor日志的相关部分。

Build started 11/21/2012 8:50:07 AM.
 1>Project "D:\temp\cqcytykz.jkt\input\src\xxx\xxx.sln" on node 1 (default targets).
 1>ValidateSolutionConfiguration:
     Building solution configuration "Release|Mixed Platforms".
 1>Project "D:\temp\cqcytykz.jkt\input\src\xxx\xxx.sln" (1) is building "D:\temp\cqcytykz.jkt\input\src\xxx\xxx\xxx.csproj" (2) on node 1 (default targets).
 2>PrepareForBuild:
     Creating directory "obj\Release\".
   ResolveAssemblyReferences:
     Primary reference "Nancy".
 2>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1578,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Nancy". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\temp\cqcytykz.jkt\input\src\xxx\xxx\xxx.csproj]

任何人都知道缺少什么?

1 个答案:

答案 0 :(得分:2)

csproj中是否有引用NuGet.targets文件的部分?您刚刚展示了解决方案中的项目,项目需要对目标文件的引用,以实际知道在构建项目时要执行的内容。

NuBuet支持并不是MSBuild / VS所知道的任何特殊内容(尽管VS确实有一个扩展来使一些事情变得更容易)。这些东西(如果你使用VS扩展“启用包恢复”功能应该插入)是告诉MSBuild它需要在构建期间运行外部命令,然后恢复包: - )