EntityDeploySplit 错误 - 缺少 Microsoft.Data.Entity.Build.Tasks.dll [英] EntityDeploySplit error - Microsoft.Data.Entity.Build.Tasks.dll missing

查看:23
本文介绍了EntityDeploySplit 错误 - 缺少 Microsoft.Data.Entity.Build.Tasks.dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在干净的 Windows 重新格式化并安装 Visual Studio 2013 后,尝试使用数据库优先的实体框架 edmx 文件构建项目会产生以下错误:

After a clean Windows reformat and installing Visual Studio 2013, trying to build a project with database-first Entity Framework edmx files yields the following error:

无法从程序集中加载EntityDeploySplit"任务C:程序文件(x86)MSBuild12.0inMicrosoft.Data.Entity.Build.Tasks.dll.可以不加载文件或程序集 'file:///C:Program Files(x86)MSBuild12.0inMicrosoft.Data.Entity.Build.Tasks.dll' 或一个其依赖项.该系统找不到指定的文件.确认声明正确,即组装并且它的所有依赖项都是可用的,并且该任务包含一个实现 Microsoft.Build.Framework.ITask 的公共类.

The "EntityDeploySplit" task could not be loaded from the assembly C:Program Files (x86)MSBuild12.0inMicrosoft.Data.Entity.Build.Tasks.dll. Could not load file or assembly 'file:///C:Program Files (x86)MSBuild12.0inMicrosoft.Data.Entity.Build.Tasks.dll' or one of its dependencies. The system cannot find the file specified. Confirm that the declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.

有什么方法可以单独安装吗?这个程序集默认包含什么?

Is there some way to install this separately? What is this assembly included with by default?

更新:这在寻找 EntityClean 任务时也会表现出来.我倾向于认为它首先检查 bin,因为另一个运行良好的开发人员尝试了 clean/rebuild,然后它开始出现.

UPDATE: This also manifests itself when looking for the EntityClean task. I'm inclined to think that it checks the bin first, since another developer who was running it fine tried a clean / rebuild and then this started showing up.

推荐答案

我遇到了这个问题,并且能够按照下面的描述解决它.您的路径和变量可能不同.

I ran into this problem and was able to fix it as I have described below. Your paths and variables may be different.

我发现当我的项目构建时它指向这个目标文件:

I found that when my project builds it points to this target file:

C:Program Files (x86)MSBuild12.0BinMicrosoft.Data.Entity.targets

该目标文件似乎只是一个占位符.该文件中有一个 Import 元素,它指向运行位于该路径的目标文件的 $(MSBuildFrameworkToolsPath)Microsoft.Data.Entity.targets.我搜索了注册表,发现 MSBuildFrameworkToolsPath 是一个注册表项,其值为 C:WindowsMicrosoft.NETFrameworkv4.0.30319

That target file appears to just be a placeholder. There is an Import element, in that file, that points to $(MSBuildFrameworkToolsPath)Microsoft.Data.Entity.targets which runs the target file located at that path. I searched registry and found that MSBuildFrameworkToolsPath is a registry entry with the value of C:WindowsMicrosoft.NETFrameworkv4.0.30319

我转到引用的目标文件并搜索在我的异常中指定的 UsingTask 元素.在 UsingTask 元素内,AssemblyFile 属性指向 $(MSBuildBinPath)Microsoft.Data.Entity.Build.Tasks.dll.我搜索了注册表,发现 MSBuildBinPath 注册表项指向 c:WindowsMicrosoft.NETFrameworkv3.5

I went to the targets file that was referenced and search for the UsingTask element that was specified in my exception. Inside the UsingTask element, the AssemblyFile attribute was pointed to $(MSBuildBinPath)Microsoft.Data.Entity.Build.Tasks.dll. I searched the registry and found that the MSBuildBinPath registry entry was pointed to c:WindowsMicrosoft.NETFrameworkv3.5

我不确定为什么会指出它,可能是框架或 Visual Studio 安装没有清理它.最后,我将所有 UsingTask 元素的 AssemblyFile 属性更改为:

I'm not sure why it was pointed to that, maybe a Framework or Visual Studio installation didn't clean it up. Finally, I changed all my UsingTask elements' AssemblyFile attributes to:

$(MSBuildFrameworkToolsPath)Microsoft.Data.Entity.Build.Tasks.dll

我使用了与 MSBuild Bin 目标文件中相同的变量.

I used the same variable that was in the MSBuild Bin target file.

希望这会有所帮助.

这篇关于EntityDeploySplit 错误 - 缺少 Microsoft.Data.Entity.Build.Tasks.dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆