Continuous integration Team Services持续集成生成引用Nuget失败

Continuous integration Team Services持续集成生成引用Nuget失败,continuous-integration,nuget,azure-devops,Continuous Integration,Nuget,Azure Devops,我正试图通过团队服务实现解决方案的持续集成。我的解决方案在本地构建,没有任何问题。Nuget安装时生成过程失败: Error: D:\a\_tasks\NuGetInstaller_333b11bd-d341-40d9-afcf-b32d5ce6f23b\0.2.29\node_modules\nuget-task-common\NuGet\3.5.0\NuGet.exe failed with return code: 1 Packages failed to install solutio

我正试图通过团队服务实现解决方案的持续集成。我的解决方案在本地构建,没有任何问题。Nuget安装时生成过程失败:

Error: D:\a\_tasks\NuGetInstaller_333b11bd-d341-40d9-afcf-b32d5ce6f23b\0.2.29\node_modules\nuget-task-common\NuGet\3.5.0\NuGet.exe failed with return code: 1
Packages failed to install
solution或packages.config的路径设置为SLN文件名(boilerplate.SLN) 安装类型设置为“安装”

我不想设置package.config的路径,因为此解决方案中有多个项目

如果我将安装类型设置为RESTORE,Nuget RESTORE任务将通过,但构建解决方案将失败,并出现一系列警告和错误:

Warnings: (one of many but all similar)
C:\Program Files (x86)\MSBuild\14.0\bin\amd64\Microsoft.Common.CurrentVersion.targets(1820,5): Warning MSB3245: Could not resolve this reference. Could not locate the assembly "EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.

Errors: (one of many but all similar)
src\DB\BoilerPlate.Data.Context\BoilerPlateContext.cs(3,23): Error CS0234: The type or namespace name 'Entity' does not exist in the namespace 'System.Data' (are you missing an assembly reference?)
我只是不明白这个过程是如何工作的,请帮助我,我是新手

我的文件夹结构如下所示:

BoilerPlate.sln
packages
src
src\db
src\DB\BoilerPlate.Data.Context\
src\DB\BoilerPlate.Data.Context\package.config
src\DB\BoilerPlate.Data.Entities\

我从存储库中删除了“包”,然后运行内置团队服务,这就解决了问题。如果您正在使用“还原”,请将“packages”目录放在gitignore中。

我今天刚刚遇到了这个错误。我通过使用我们的基本代码分支查看解决方案文件中的更改来修复此错误,并发现一些不应该存在的旧行。我认为它们是错误合并的结果,应该在冲突解决期间删除

为了解决这个问题,我只是删除了旧的引用,所有的东西都构建得很好

Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Services", "Services", "{EAECFF2D-7339-4180-8E1E-6DF9EC9EB131}"
EndProject
{3C14F190-6B6A-4913-9681-AFD9B62850FA} = {EAECFF2D-7339-4180-8E1E-6DF9EC9EB131}
{687ECE00-A567-40F3-BFF9-C3B639328F27} = {EAECFF2D-7339-4180-8E1E-6DF9EC9EB131}
还可以看到关于同一主题的这篇老文章:

谢谢,
Fissh

“恢复”是您需要的。看起来实体框架可能未安装在生成服务器上的全局程序集缓存中。检查EntityFramework是否作为NuGet软件包安装在您的解决方案中。@jessehouwing Entity作为NuGet软件包安装。但它看起来是从GAC加载的,否则错误消息将显示它预期程序集所在的路径。您能检查一下
@jessehow引用EntityFramework的路径是否设置为my repo…\..\..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll中的my package文件夹吗