2013-02-14 152 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权限。 要排除故障,请尝试使用构建控制器的帐户登录到您的构建计算机,并查看是否可以找到这些路径并手动进行自己的构建。