Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2012/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual studio 2012 nuget软件包的AppHarbor生成错误_Visual Studio 2012_Nuget_Bitbucket_Appharbor - Fatal编程技术网

Visual studio 2012 nuget软件包的AppHarbor生成错误

Visual studio 2012 nuget软件包的AppHarbor生成错误,visual-studio-2012,nuget,bitbucket,appharbor,Visual Studio 2012,Nuget,Bitbucket,Appharbor,从bitbucket部署到AppHarbor时,我遇到构建错误。这与其中一个项目无法解决来自Nuget的依赖关系有关。在我的机器上,一切都很好。知识-我非常熟悉Nuget和一个经验丰富的开发人员。我可能是通过在本地随意移动文件夹并重新创建bitbucket repo造成的。我已经检查了bitbucket源代码,与本地源代码相比,似乎一切都在那里 我的解决方案的结构与此类似: 模型是一个核心/模型类库项目。web是一个web应用程序(webapi2+html),它依赖于模型。在我的本地机器上都能正

从bitbucket部署到AppHarbor时,我遇到构建错误。这与其中一个项目无法解决来自Nuget的依赖关系有关。在我的机器上,一切都很好。知识-我非常熟悉Nuget和一个经验丰富的开发人员。我可能是通过在本地随意移动文件夹并重新创建bitbucket repo造成的。我已经检查了bitbucket源代码,与本地源代码相比,似乎一切都在那里

我的解决方案的结构与此类似: 模型是一个核心/模型类库项目。web是一个web应用程序(webapi2+html),它依赖于模型。在我的本地机器上都能正确构建和运行,但我最近在Bitbucket上遇到了一些问题,所以我在磁盘上移动了一些东西,并创建了一个新的存储库。只有当它被运送到Appharbor时,这才破坏了构建

两个项目都启用了Nuget程序包还原

以下是AppHarbor构建过程日志的顶部: 如您所见,“模型”(#4)项目无法解析MongoRepository nuget包的引用。它会级联并破坏构建

以下是模型项目的packages.config:

csproj中有一些路径已断开:

..\web\packages\mongocsharpdriver.1.8.3\lib\net35\MongoDB.Bson.dll
..\web\packages\mongocsharpdriver.1.8.3\lib\net35\MongoDB.Driver.dll
假的
..\packages\MongoRepository.1.6.3\lib\net45\MongoRepository.net45.dll

需要将HintPath更改为..\packages以删除web目录。

将HintPath更改为
。\packages
对我不起作用,但将其更改为
$(Solutiondir)\packages
对我很有效

\repo\app.sln
\repo\model\model.csproj
\repo\web\web.csproj
Build started 2/7/2014 5:19:58 AM.
     1>Project "D:\temp\g0q2xqui.baf\input\app.sln" on node 1 (default targets).
     1>ValidateSolutionConfiguration:
         Building solution configuration "Release|Any CPU".
     1>Project "D:\temp\g0q2xqui.baf\input\app.sln" (1) is building "D:\temp\g0q2xqui.baf\input\web\web.csproj" (2) on node 1 (default targets).
     2>RestorePackages:
         "D:\temp\g0q2xqui.baf\input\.nuget\NuGet.exe" install "packages.config" -source ""  -NonInteractive -RequireConsent -solutionDir "D:\temp\g0q2xqui.baf\input\ "
     1>Project "D:\temp\g0q2xqui.baf\input\app.sln" (1) is building "D:\temp\g0q2xqui.baf\input\model\model.csproj" (4) on node 2 (default targets).
     4>RestorePackages:
         "D:\temp\g0q2xqui.baf\input\.nuget\NuGet.exe" install "packages.config" -source ""  -NonInteractive -RequireConsent -solutionDir "D:\temp\g0q2xqui.baf\input\ "
     2>RestorePackages:
         Restoring NuGet packages...
         To prevent NuGet from downloading packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages'.
         All packages listed in packages.config are already installed.
     4>RestorePackages:
         Restoring NuGet packages...
         To prevent NuGet from downloading packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages'.
         All packages listed in packages.config are already installed.
       ResolveAssemblyReferences:
         Primary reference "MongoDB.Bson".
     4>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "MongoDB.Bson". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\temp\g0q2xqui.baf\input\model\model.csproj]
                 For SearchPath "{HintPathFromItem}".
<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="mongocsharpdriver" version="1.8.3" targetFramework="net45" />
  <package id="MongoRepository" version="1.6.3" targetFramework="net45" />
</packages>
  <ItemGroup>
    <Reference Include="MongoDB.Bson">
      <HintPath>..\web\packages\mongocsharpdriver.1.8.3\lib\net35\MongoDB.Bson.dll</HintPath>
    </Reference>
    <Reference Include="MongoDB.Driver">
      <HintPath>..\web\packages\mongocsharpdriver.1.8.3\lib\net35\MongoDB.Driver.dll</HintPath>
    </Reference>
    <Reference Include="MongoRepository.Net45, Version=1.6.2.0, Culture=neutral, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\packages\MongoRepository.1.6.3\lib\net45\MongoRepository.Net45.dll</HintPath>
    </Reference>
    <Reference Include="System" />
    <Reference Include="System.Core" />
    <Reference Include="System.Xml.Linq" />
    <Reference Include="System.Data.DataSetExtensions" />
    <Reference Include="Microsoft.CSharp" />
    <Reference Include="System.Data" />
    <Reference Include="System.Xml" />
  </ItemGroup>