2013-11-15 36 views
0

我正在推送一个小的MVC应用程序到AppHarbor,它启用了Package Restore。构建AppHarbor上的还原Nuget包上的错误

它可以在我的本地机器上正常工作,但是在从github中将它拉出后构建它时会失败。

这些都是从日志的相关部分:

2>D:\temp\0gqraufl.b33\input\ISC-Devicemanagement\ISC-Devicemanagement.csproj(364,5): error : The build restored NuGet packages. Build the project again to include these packages in the build. For more information, see http://go.microsoft.com/fwlink/?LinkID=317568. 
    2>Done Building Project "D:\temp\0gqraufl.b33\input\ISC-Devicemanagement\ISC-Devicemanagement.csproj" (default targets) -- FAILED. 
    1>Done Building Project "D:\temp\0gqraufl.b33\input\ISC-Devicemanagement.sln" (default targets) -- FAILED. 

Build FAILED. 

     "D:\temp\0gqraufl.b33\input\ISC-Devicemanagement.sln" (default target) (1) -> 
     "D:\temp\0gqraufl.b33\input\ISC-Devicemanagement\ISC-Devicemanagement.csproj" (default target) (2) -> 
     (EnsureBclBuildImported target) -> 
     D:\temp\0gqraufl.b33\input\ISC-Devicemanagement\ISC-Devicemanagement.csproj(364,5): error : The build restored NuGet packages. Build the project again to include these packages in the build. For more information, see http://go.microsoft.com/fwlink/?LinkID=317568. 

    0 Warning(s) 
    1 Error(s) 

Time Elapsed 00:00:14.97 

搜索这对谷歌,给我带来了支持从AH网站,这表明其误差应在的NuGet的最新版本可以解决,但它不是,我仍然不知道如何手动解决这个问题。

我必须在这里做些什么来解决问题的核心?

回答

0

经过AppHarbor支持人员的回答,我能够理解并解决问题。

有两件事情一起玩来创建构建错误。第一个是,在Visual Studio中激活了恢复构建的Nuget包。 AppHarbor的Rune写道,新的实现应该在下周(11月18 - 24日)投入生产,并且很可能会消除这些构建错误。

构建过程在AH中实际失败的第二个原因是,VS的GitTools会在您提交更改并因此导致错误的Microsoft.Mcl.Build程序包时忽略packages文件夹。

为了解决这个问题,无论是通过手动的bash

添加此
//enter the version which is referenced in your solution 
git add packages/Microsoft.Bcl.Build.1.0.10/ -f 
git commit -m "Add Microsoft.Bcl.Build NuGet package" 

或只使用Git的客户端的窗口,然后打开你的本地仓库。它会自动建议提交整个包文件夹。

提交,同步,完成。现在编译应该可以编译。