实体框架包管理器控制台命令错误 - 构建失败 [英] Entity Framework Package Manager Console Commands Error - failed to build

查看:250
本文介绍了实体框架包管理器控制台命令错误 - 构建失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我尝试运行任何实体框架命令,如add-migration或update-database时,绝大多数时候我收到错误项目X无法构建。该项目在可视化工作室中建成良好,如果我坚持不懈,继续努力,命令将会起作用。这可能是非常令人沮丧的,因为有时它会在前5次尝试中工作,有时可能需要50次。

Whenever I try to run any entity framework command such as add-migration or update-database, the vast majority of the time I get an error "The project 'X' failed to build". The project builds fine in visual studio, and if I am persistent and keep trying eventually the command will work. It can be very frustrating as sometimes it will work on the first 5 tries, and sometimes it could take 50.

我已经阅读了提示,没有任何工作到目前为止。我认为它必须与软件包管理器控制台用来构建项目的设置有关,但我不知道它们可能是什么或如何配置它们。

I have read around for tips and nothing has worked so far. I think it must be something to do with the settings that the package manager console uses to build the project but I don't know what they might be or how to configure them.

有没有人遇到这个问题,可以提供建议?

Has anyone run into this problem before that can offer advice?

推荐答案

最后发现这是一个由 Resharper 。在执行命令时暂停复原,意味着它们不会失败。我只能假定在命令执行过程中,构建脚本运行时,resharper对文件有一个句柄。

Finally found this to be a problem caused by Resharper. Suspending resharper whilst running the commands meant that they don't fail anymore. I can only assume the problem was resharper having a handle on files whilst the build script runs during the command executions.

这篇关于实体框架包管理器控制台命令错误 - 构建失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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