我正在嘗試使用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