我正在尝试使用Team Services为我的解决方案获得持续集成。我的解决方案在本地生成,没有问题。构建过程上的NuGet失败安装:团队服务持续集成构建引用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
路径溶液或packages.config设置为 安装类型设置安装
我不想SLN的文件名(boilerplate.sln)将路径设置为package.config,因为我在此解决方案中有多个项目。
如果我设置安装类型进行还原,将的NuGet恢复任务通过,但在构建解决方案失败了一堆警告和错误的:
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\
“恢复” 是你在找什么。它看起来像实体框架可能不安装在生成服务器上的全局程序集缓存中。检查EntityFramework是否作为解决方案中的NuGet包安装。 – jessehouwing
@jessehouwing实体作为NuGet包安装。 –
但是它看起来是从GAC中加载的,否则错误信息会显示它期望程序集所在的路径。你可以检查项目文件中的'
jessehouwing