2013-02-14 126 views
4

當我在TFS中構建我的項目時,無法找到實體fraemwork,但是當我查看其中的文件夾時;構建無法找到實體框架

我收到這些錯誤信息;

Build started 14/02/2013 15:44:50. 
Project "C:\Builds\1\SCD\SCD - New Test\Sources\MVC\SCD\SCD.sln" on node 1 (default targets). 
ValidateSolutionConfiguration: 
    Building solution configuration "Debug|Any CPU". 
Project "C:\Builds\1\SCD\SCD - New Test\Sources\MVC\SCD\SCD.sln" (1) is building "C:\Builds\1\SCD\SCD - New Test\Sources\MVC\SCD\SCD\SCD.csproj" (2) on node 1 (default targets). 
EntityDeployNonEmbeddedResources: 
Skipping target "EntityDeployNonEmbeddedResources" because it has no outputs. 
EntityDeployEmbeddedResources: 
    Processing 1 EDMX files. 
    Starting to process input file 'Models\SCD.edmx'. 
    Finished processing input file 'Models\SCD.edmx'. 
    Finished processing 1 EDMX files. 
Project "C:\Builds\1\SCD\SCD - New Test\Sources\MVC\SCD\SCD\SCD.csproj" (2) is building "C:\Builds\1\SCD\SCD - New Test\Sources\StandardClassLibrary\StandardClassLibrary\StandardClassLibrary.csproj" (3) on node 1 (default targets). 
PrepareForBuild: 
    Creating directory "obj\Debug\". 
ResolveAssemblyReferences: 
    Primary reference "EntityFramework". 
c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1360,9): warning MSB3245: Could not resolve this reference. Could not locate the assembly "EntityFramework". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [C:\Builds\1\SCD\SCD - New Test\Sources\StandardClassLibrary\StandardClassLibrary\StandardClassLibrary.csproj] 
      For SearchPath "{HintPathFromItem}". 
      Considered "..\packages\EntityFramework.5.0.0\lib\net40\EntityFramework.dll", but it didn't exist. 
      For SearchPath "{TargetFrameworkDirectory}". 
      Considered "C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\EntityFramework.dll", but it didn't exist. 
      Considered "C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\EntityFramework.exe", but it didn't exist. 
      For SearchPath "{Registry:Software\Microsoft\.NETFramework,v4.0,AssemblyFoldersEx}". 
      Considered "C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\ReferenceAssemblies\v4.0\EntityFramework.dll", but it didn't exist. 

等等。我需要做些什麼來解決這個問題?

+0

「當我看到該文件夾​​中它是存在的」文件夾?在構建服務器上? – 2013-02-14 15:56:01

+0

當然,它必須在我的開發服務器上,它是,然後它被複制到生成服務器? – arame3333 2013-02-14 16:09:59

+0

我會驗證它在構建服務器上。 – 2013-02-14 16:15:55

回答

5

聽起來您的構建服務器不會自動下載NuGet包。我假設你正在使用NuGet,因爲構建正在尋找「包」文件夾中的依賴關係。

我想看看下面的一些文章:

Using Nuget and TFS Build 2010

NuGet and TFS 2010 Automated Build

+0

那麼你給的第一個鏈接似乎完全符合我的問題。但是,當我「然後按下添加文件按鈕」時,沒有一個。我最終檢查了EF DLL,但那不是鏈接所說的,它不起作用。 – arame3333 2013-02-14 16:57:28

+0

它應該被標記爲「添加項目到文件夾」。您也可以嘗試通過在解決方案資源管理器中右鍵單擊文件夾並選擇「添加到源代碼管理」來從Visual Studio添加文件夾。 – 2013-02-14 17:18:21

+0

我不知道這是否是完美的解決方案,但您的答案以我的方式幫助了我。我創建了一個圖書館; lib爲每個項目與所有第三方庫。現在它建立。非常感謝你的幫忙。 – arame3333 2013-02-15 08:21:33

0

檢查用於構建控制器的帳戶的NTFS權限。 要排除故障,請嘗試使用構建控制器的帳戶登錄到您的構建計算機,並查看是否可以找到這些路徑並手動進行自己的構建。