C# 生成找不到实体框架

C# 生成找不到实体框架,c#,build,C#,Build,当我在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

当我在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.

等等。我需要做什么来修复此问题?

检查您用于生成控制器的帐户的NTFS权限。
要进行故障排除,请尝试使用生成控制器的帐户登录到生成计算机,查看是否可以找到这些路径并手动生成自己的生成。

听起来生成服务器没有自动下载NuGet软件包。我假设您正在使用NuGet,因为构建正在“packages”文件夹中查找依赖项

我想看看以下几篇文章:


“当我查看文件夹时,它就在那里”哪个文件夹?在生成服务器上?当然它必须在我的开发服务器上,它是,然后它被复制到生成服务器上?我将验证它是否在生成服务器上。您使用的是什么版本的TFS?文件不会从开发服务器复制到生成服务器。生成服务器从其自己的HDD或TFS获取其所有文件。如果这些文件不在构建服务器的硬盘上,那么这就是问题所在。您给出的第一个链接似乎完全符合我的问题。然而,当我进入“然后按下添加文件按钮”时,却没有一个。我最后检查了EF dll,但这并不是链接所说的内容,它不起作用。它应该被标记为“将项目添加到文件夹”。您也可以尝试从Visual Studio中添加文件夹,方法是在解决方案资源管理器中右键单击该文件夹并选择“添加到源代码管理”。我不知道这是否是一个完美的解决方案,但您的回答帮助了我。我创建了一个图书馆;包含所有第三方库的每个项目的库。现在它已经建立起来了。所以谢谢你。